libc: test "1 strerror" since zero gives different output on different platforms.
parent
5e129a8964
commit
d031109cc4
|
@ -1,13 +1,13 @@
|
||||||
IN: libc.tests
|
IN: libc.tests
|
||||||
USING: libc libc.private tools.test namespaces assocs
|
USING: libc libc.private tools.test namespaces assocs system
|
||||||
destructors kernel ;
|
destructors kernel combinators ;
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
[ "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
|
||||||
|
|
Loading…
Reference in New Issue