1 USING: alien alien.c-types alien.data alien.syntax
2 classes.struct kernel sequences specialized-arrays
3 specialized-arrays.private tools.test compiler.units vocabs ;
7 [ -1 ] [ -1 char <ref> char deref ] unit-test
8 [ -1 ] [ -1 short <ref> short deref ] unit-test
9 [ -1 ] [ -1 int <ref> int deref ] unit-test
11 ! I don't care if this throws an error or works, but at least
12 ! it should be consistent between platforms
13 [ -1 ] [ -1.0 int <ref> int deref ] unit-test
14 [ -1 ] [ -1.0 long <ref> long deref ] unit-test
15 [ -1 ] [ -1.0 longlong <ref> longlong deref ] unit-test
16 [ 1 ] [ 1.0 uint <ref> uint deref ] unit-test
17 [ 1 ] [ 1.0 ulong <ref> ulong deref ] unit-test
18 [ 1 ] [ 1.0 ulonglong <ref> ulonglong deref ] unit-test
21 0 B{ 1 2 3 4 } <displaced-alien> void* <ref>
24 os windows? cpu x86.64? and [
25 [ -2147467259 ] [ 2147500037 long <ref> long deref ] unit-test
28 STRUCT: foo { a int } { b void* } { c bool } ;
30 SPECIALIZED-ARRAY: foo
32 [ t ] [ 0 binary-zero? ] unit-test
33 [ f ] [ 1 binary-zero? ] unit-test
34 [ f ] [ -1 binary-zero? ] unit-test
35 [ t ] [ 0.0 binary-zero? ] unit-test
36 [ f ] [ 1.0 binary-zero? ] unit-test
37 [ f ] [ -0.0 binary-zero? ] unit-test
38 [ t ] [ C{ 0.0 0.0 } binary-zero? ] unit-test
39 [ f ] [ C{ 1.0 0.0 } binary-zero? ] unit-test
40 [ f ] [ C{ -0.0 0.0 } binary-zero? ] unit-test
41 [ f ] [ C{ 0.0 1.0 } binary-zero? ] unit-test
42 [ f ] [ C{ 0.0 -0.0 } binary-zero? ] unit-test
43 [ t ] [ f binary-zero? ] unit-test
44 [ t ] [ 0 <alien> binary-zero? ] unit-test
45 [ f ] [ 1 <alien> binary-zero? ] unit-test
46 [ f ] [ B{ } binary-zero? ] unit-test
47 [ t ] [ S{ foo f 0 f f } binary-zero? ] unit-test
48 [ f ] [ S{ foo f 1 f f } binary-zero? ] unit-test
49 [ f ] [ S{ foo f 0 ALIEN: 8 f } binary-zero? ] unit-test
50 [ f ] [ S{ foo f 0 f t } binary-zero? ] unit-test
56 } [ first binary-zero? ] [ second binary-zero? ] [ third binary-zero? ] tri
61 foo specialized-array-vocab forget-vocab
62 ] with-compilation-unit