From d031109cc4d307452fc113e1b523f8517cbb9f7d Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 4 Apr 2014 09:28:39 -0700 Subject: [PATCH] libc: test "1 strerror" since zero gives different output on different platforms. --- basis/libc/libc-tests.factor | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/basis/libc/libc-tests.factor b/basis/libc/libc-tests.factor index 0a35a2b7b2..9bc13bbfc4 100644 --- a/basis/libc/libc-tests.factor +++ b/basis/libc/libc-tests.factor @@ -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