Add some failing unit tests

slava 2006-10-30 02:21:48 +00:00
parent 8964e4ed26
commit 5bb98d28d9
6 changed files with 23 additions and 2 deletions

View File

@ -1,5 +1,6 @@
IN: temporary
USING: alien compiler kernel namespaces namespaces test ;
USING: alien compiler kernel namespaces namespaces test
sequences ;
FUNCTION: void ffi_test_0 ;
[ ] [ ffi_test_0 ] unit-test
@ -85,3 +86,8 @@ cpu "x86" = macosx? and [
[ 5 ]
[ 2 3 "ffi_test_2" f dlsym <alien> indirect-test-2 ]
unit-test
! Make sure we do a GC if necessary
FUNCTION: void ffi_test_15 int x ;
[ ] [ 10000000 [ drop 1/3 ffi_test_15 ] each ] unit-test

View File

@ -5,8 +5,14 @@ test errors ;
[ 0 ] [ f size ] unit-test
[ t ] [ [ \ = \ = ] all-equal? ] unit-test
! (clone) primitive was missing GC check
! some primitives are missing GC checks
[ ] [ 1000000 [ drop H{ } clone >n n> drop ] each ] unit-test
[ ] [ 1.0 10000000 [ drop 1.0 * ] each ] unit-test
[ ] [ 268435455 >fixnum 10000000 [ drop dup dup + drop ] each ] unit-test
[ ] [ 268435455 >fixnum 10000000 [ drop dup dup fixnum+ drop ] each ] unit-test
[ ] [ 10000000 [ drop 1/3 >fixnum drop ] each ] unit-test
[ ] [ 10000000 [ drop 1/3 >bignum drop ] each ] unit-test
[ ] [ 10000000 [ drop 1/3 >float drop ] each ] unit-test
[ t ] [ cell integer? ] unit-test
[ t ] [ bootstrap-cell integer? ] unit-test

View File

@ -109,6 +109,8 @@ unit-test
[ f ] [ "fdsf" bin> ] unit-test
[ 3 ] [ "11" bin> ] unit-test
[ f ] [ "\0." string>number ] unit-test
! [ t ] [
! { "1.0/0.0" "-1.0/0.0" "0.0/0.0" }
! [ dup string>number number>string = ] all?

View File

@ -78,3 +78,6 @@ unit-test
[ [ ] ] [ "IN: temporary : foo ( a b -- c ) + ;" parse ] unit-test
[ [ ] ] [ "IN: temporary : foo ;" parse ] unit-test
[ f ] [ \ foo "declared-effect" word-prop ] unit-test
! Funny bug
[ 2 ] [ "IN: temporary : \0. 2 ; \0." eval ] unit-test

View File

@ -93,3 +93,5 @@ struct foo ffi_test_14(int x, int y)
r.x = x; r.y = y;
return r;
}
void ffi_test_15(int x) { }

View File

@ -15,3 +15,5 @@ struct rect { float x, y, w, h; };
DLLEXPORT int ffi_test_12(int a, int b, struct rect c, int d, int e, int f);
DLLEXPORT int ffi_test_13(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k);
DLLEXPORT struct foo ffi_test_14(int x, int y);
DLLEXPORT void ffi_test_15(int x);