Add some failing unit tests
parent
8964e4ed26
commit
5bb98d28d9
|
@ -1,5 +1,6 @@
|
||||||
IN: temporary
|
IN: temporary
|
||||||
USING: alien compiler kernel namespaces namespaces test ;
|
USING: alien compiler kernel namespaces namespaces test
|
||||||
|
sequences ;
|
||||||
|
|
||||||
FUNCTION: void ffi_test_0 ;
|
FUNCTION: void ffi_test_0 ;
|
||||||
[ ] [ ffi_test_0 ] unit-test
|
[ ] [ ffi_test_0 ] unit-test
|
||||||
|
@ -85,3 +86,8 @@ cpu "x86" = macosx? and [
|
||||||
[ 5 ]
|
[ 5 ]
|
||||||
[ 2 3 "ffi_test_2" f dlsym <alien> indirect-test-2 ]
|
[ 2 3 "ffi_test_2" f dlsym <alien> indirect-test-2 ]
|
||||||
unit-test
|
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
|
||||||
|
|
|
@ -5,8 +5,14 @@ test errors ;
|
||||||
[ 0 ] [ f size ] unit-test
|
[ 0 ] [ f size ] unit-test
|
||||||
[ t ] [ [ \ = \ = ] all-equal? ] 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
|
[ ] [ 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 ] [ cell integer? ] unit-test
|
||||||
[ t ] [ bootstrap-cell integer? ] unit-test
|
[ t ] [ bootstrap-cell integer? ] unit-test
|
||||||
|
|
|
@ -109,6 +109,8 @@ unit-test
|
||||||
[ f ] [ "fdsf" bin> ] unit-test
|
[ f ] [ "fdsf" bin> ] unit-test
|
||||||
[ 3 ] [ "11" bin> ] unit-test
|
[ 3 ] [ "11" bin> ] unit-test
|
||||||
|
|
||||||
|
[ f ] [ "\0." string>number ] unit-test
|
||||||
|
|
||||||
! [ t ] [
|
! [ t ] [
|
||||||
! { "1.0/0.0" "-1.0/0.0" "0.0/0.0" }
|
! { "1.0/0.0" "-1.0/0.0" "0.0/0.0" }
|
||||||
! [ dup string>number number>string = ] all?
|
! [ dup string>number number>string = ] all?
|
||||||
|
|
|
@ -78,3 +78,6 @@ unit-test
|
||||||
[ [ ] ] [ "IN: temporary : foo ( a b -- c ) + ;" parse ] unit-test
|
[ [ ] ] [ "IN: temporary : foo ( a b -- c ) + ;" parse ] unit-test
|
||||||
[ [ ] ] [ "IN: temporary : foo ;" parse ] unit-test
|
[ [ ] ] [ "IN: temporary : foo ;" parse ] unit-test
|
||||||
[ f ] [ \ foo "declared-effect" word-prop ] unit-test
|
[ f ] [ \ foo "declared-effect" word-prop ] unit-test
|
||||||
|
|
||||||
|
! Funny bug
|
||||||
|
[ 2 ] [ "IN: temporary : \0. 2 ; \0." eval ] unit-test
|
||||||
|
|
|
@ -93,3 +93,5 @@ struct foo ffi_test_14(int x, int y)
|
||||||
r.x = x; r.y = y;
|
r.x = x; r.y = y;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ffi_test_15(int x) { }
|
||||||
|
|
|
@ -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_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 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 struct foo ffi_test_14(int x, int y);
|
||||||
|
DLLEXPORT void ffi_test_15(int x);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue