classes.struct, specialized-arrays: fix unit tests to work when forget-tests? is on
parent
99a3b3c9f6
commit
3c11991843
|
@ -4,9 +4,11 @@ assocs byte-arrays classes.struct classes.tuple.parser
|
||||||
classes.tuple.private classes.tuple combinators compiler.tree.debugger
|
classes.tuple.private classes.tuple combinators compiler.tree.debugger
|
||||||
compiler.units destructors io.encodings.utf8 io.pathnames
|
compiler.units destructors io.encodings.utf8 io.pathnames
|
||||||
io.streams.string kernel libc literals math mirrors namespaces
|
io.streams.string kernel libc literals math mirrors namespaces
|
||||||
prettyprint prettyprint.config see sequences specialized-arrays system
|
prettyprint prettyprint.config see sequences specialized-arrays
|
||||||
tools.test parser lexer eval layouts generic.single classes ;
|
system tools.test parser lexer eval layouts generic.single classes
|
||||||
|
vocabs ;
|
||||||
FROM: math => float ;
|
FROM: math => float ;
|
||||||
|
FROM: specialized-arrays.private => specialized-array-vocab ;
|
||||||
QUALIFIED-WITH: alien.c-types c
|
QUALIFIED-WITH: alien.c-types c
|
||||||
SPECIALIZED-ARRAY: char
|
SPECIALIZED-ARRAY: char
|
||||||
SPECIALIZED-ARRAY: int
|
SPECIALIZED-ARRAY: int
|
||||||
|
@ -303,6 +305,12 @@ SPECIALIZED-ARRAY: struct-test-optimization
|
||||||
{ x>> } inlined?
|
{ x>> } inlined?
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
[ ] [
|
||||||
|
[
|
||||||
|
struct-test-optimization specialized-array-vocab forget-vocab
|
||||||
|
] with-compilation-unit
|
||||||
|
] unit-test
|
||||||
|
|
||||||
! Test cloning structs
|
! Test cloning structs
|
||||||
STRUCT: clone-test-struct { x int } { y char[3] } ;
|
STRUCT: clone-test-struct { x int } { y char[3] } ;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
IN: specialized-arrays.tests
|
USING: tools.test alien.syntax specialized-arrays sequences
|
||||||
USING: tools.test alien.syntax specialized-arrays
|
alien accessors kernel arrays combinators compiler
|
||||||
specialized-arrays.private sequences alien accessors
|
compiler.units classes.struct combinators.smart
|
||||||
kernel arrays combinators compiler compiler.units classes.struct
|
compiler.tree.debugger math libc destructors sequences.private
|
||||||
combinators.smart compiler.tree.debugger math libc destructors
|
multiline eval words vocabs namespaces assocs prettyprint
|
||||||
sequences.private multiline eval words vocabs namespaces
|
alien.data math.vectors definitions compiler.test ;
|
||||||
assocs prettyprint alien.data math.vectors definitions
|
FROM: specialized-arrays.private => specialized-array-vocab ;
|
||||||
compiler.test ;
|
|
||||||
FROM: alien.c-types => int float bool char float ulonglong ushort uint
|
FROM: alien.c-types => int float bool char float ulonglong ushort uint
|
||||||
heap-size little-endian? ;
|
heap-size little-endian? ;
|
||||||
|
IN: specialized-arrays.tests
|
||||||
|
|
||||||
SPECIALIZED-ARRAY: int
|
SPECIALIZED-ARRAY: int
|
||||||
SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ;
|
SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ;
|
||||||
|
@ -101,6 +101,12 @@ SPECIALIZED-ARRAY: test-struct
|
||||||
} second
|
} second
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
[ ] [
|
||||||
|
[
|
||||||
|
test-struct specialized-array-vocab forget-vocab
|
||||||
|
] with-compilation-unit
|
||||||
|
] unit-test
|
||||||
|
|
||||||
! Regression
|
! Regression
|
||||||
STRUCT: fixed-string { text char[64] } ;
|
STRUCT: fixed-string { text char[64] } ;
|
||||||
|
|
||||||
|
@ -115,6 +121,12 @@ SPECIALIZED-ARRAY: fixed-string
|
||||||
ALIEN: 123 100 <direct-int-array> byte-length
|
ALIEN: 123 100 <direct-int-array> byte-length
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
[ ] [
|
||||||
|
[
|
||||||
|
fixed-string specialized-array-vocab forget-vocab
|
||||||
|
] with-compilation-unit
|
||||||
|
] unit-test
|
||||||
|
|
||||||
! Test prettyprinting
|
! Test prettyprinting
|
||||||
[ "int-array{ 1 2 3 }" ] [ int-array{ 1 2 3 } unparse ] unit-test
|
[ "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
|
[ "int-array@ f 100" ] [ f 100 <direct-int-array> unparse ] unit-test
|
||||||
|
@ -172,3 +184,9 @@ SPECIALIZED-ARRAY: struct-resize-test
|
||||||
[ 80 ] [ 10 <struct-resize-test-array> byte-length ] unit-test
|
[ 80 ] [ 10 <struct-resize-test-array> byte-length ] unit-test
|
||||||
|
|
||||||
[ { 10 20 30 } ] [ { 10 20 30 } struct-resize-test-usage ] 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
|
||||||
|
|
Loading…
Reference in New Issue