libc: test "1 strerror" since zero gives different output on different platforms.

db4
John Benediktsson 2014-04-04 09:28:39 -07:00
parent 5e129a8964
commit d031109cc4
1 changed files with 12 additions and 12 deletions

View File

@ -1,13 +1,13 @@
IN: libc.tests
USING: libc libc.private tools.test namespaces assocs
destructors kernel ;
100 malloc "block" set
[ t ] [ "block" get malloc-exists? ] unit-test
[ ] [ [ "block" get &free drop ] with-destructors ] unit-test
[ f ] [ "block" get malloc-exists? ] unit-test
IN: libc.tests
USING: libc libc.private tools.test namespaces assocs system
destructors kernel combinators ;
[ "No error" ] [ 0 strerror ] unit-test
100 malloc "block" set
[ t ] [ "block" get malloc-exists? ] unit-test
[ ] [ [ "block" get &free drop ] with-destructors ] unit-test
[ f ] [ "block" get malloc-exists? ] unit-test
[ "Operation not permitted" ] [ 1 strerror ] unit-test