classes.tuple.private classes.tuple combinators compiler.tree.debugger
compiler.units destructors io.encodings.utf8 io.pathnames
io.streams.string kernel libc literals math mirrors namespaces
-prettyprint prettyprint.config see sequences specialized-arrays system
-tools.test parser lexer eval layouts generic.single classes ;
+prettyprint prettyprint.config see sequences specialized-arrays
+system tools.test parser lexer eval layouts generic.single classes
+vocabs ;
FROM: math => float ;
+FROM: specialized-arrays.private => specialized-array-vocab ;
QUALIFIED-WITH: alien.c-types c
SPECIALIZED-ARRAY: char
SPECIALIZED-ARRAY: int
{ x>> } inlined?
] unit-test
+[ ] [
+ [
+ struct-test-optimization specialized-array-vocab forget-vocab
+ ] with-compilation-unit
+] unit-test
+
! Test cloning structs
STRUCT: clone-test-struct { x int } { y char[3] } ;
-IN: specialized-arrays.tests
-USING: tools.test alien.syntax specialized-arrays
-specialized-arrays.private sequences alien accessors
-kernel arrays combinators compiler compiler.units classes.struct
-combinators.smart compiler.tree.debugger math libc destructors
-sequences.private multiline eval words vocabs namespaces
-assocs prettyprint alien.data math.vectors definitions
-compiler.test ;
+USING: tools.test alien.syntax specialized-arrays sequences
+alien accessors kernel arrays combinators compiler
+compiler.units classes.struct combinators.smart
+compiler.tree.debugger math libc destructors sequences.private
+multiline eval words vocabs namespaces assocs prettyprint
+alien.data math.vectors definitions compiler.test ;
+FROM: specialized-arrays.private => specialized-array-vocab ;
FROM: alien.c-types => int float bool char float ulonglong ushort uint
heap-size little-endian? ;
+IN: specialized-arrays.tests
SPECIALIZED-ARRAY: int
SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ;
} second
] unit-test
+[ ] [
+ [
+ test-struct specialized-array-vocab forget-vocab
+ ] with-compilation-unit
+] unit-test
+
! Regression
STRUCT: fixed-string { text char[64] } ;
ALIEN: 123 100 <direct-int-array> byte-length
] unit-test
+[ ] [
+ [
+ fixed-string specialized-array-vocab forget-vocab
+ ] with-compilation-unit
+] unit-test
+
! Test prettyprinting
[ "int-array{ 1 2 3 }" ] [ int-array{ 1 2 3 } unparse ] unit-test
[ "int-array@ f 100" ] [ f 100 <direct-int-array> unparse ] unit-test
[ 80 ] [ 10 <struct-resize-test-array> byte-length ] unit-test
[ { 10 20 30 } ] [ { 10 20 30 } struct-resize-test-usage ] unit-test
+
+[ ] [
+ [
+ struct-resize-test specialized-array-vocab forget-vocab
+ ] with-compilation-unit
+] unit-test