1 IN: specialized-arrays.tests
2 USING: tools.test specialized-arrays sequences
3 specialized-arrays.int specialized-arrays.bool
4 specialized-arrays.ushort alien.c-types accessors kernel ;
6 [ t ] [ { 1 2 3 } >int-array int-array? ] unit-test
8 [ t ] [ int-array{ 1 2 3 } int-array? ] unit-test
10 [ 2 ] [ int-array{ 1 2 3 } second ] unit-test
12 [ t ] [ { t f t } >bool-array underlying>> { 1 0 1 } >int-array underlying>> = ] unit-test
14 [ ushort-array{ 1234 } ] [
15 little-endian? B{ 210 4 } B{ 4 210 } ? byte-array>ushort-array
18 [ B{ 210 4 1 } byte-array>ushort-array ] must-fail