Fix assocs, generic.standard tests
parent
460a43236b
commit
0ba5304ee3
|
@ -1,7 +1,7 @@
|
||||||
IN: assocs.tests
|
IN: assocs.tests
|
||||||
USING: kernel math namespaces make tools.test vectors sequences
|
USING: kernel math namespaces make tools.test vectors sequences
|
||||||
sequences.private hashtables io prettyprint assocs
|
sequences.private hashtables io prettyprint assocs
|
||||||
continuations float-arrays ;
|
continuations specialized-arrays.double ;
|
||||||
|
|
||||||
[ t ] [ H{ } dup assoc-subset? ] unit-test
|
[ t ] [ H{ } dup assoc-subset? ] unit-test
|
||||||
[ f ] [ H{ { 1 3 } } H{ } assoc-subset? ] unit-test
|
[ f ] [ H{ { 1 3 } } H{ } assoc-subset? ] unit-test
|
||||||
|
@ -91,7 +91,7 @@ unit-test
|
||||||
[
|
[
|
||||||
H{ { 1.0 1.0 } { 2.0 2.0 } }
|
H{ { 1.0 1.0 } { 2.0 2.0 } }
|
||||||
] [
|
] [
|
||||||
F{ 1.0 2.0 } [ dup ] H{ } map>assoc
|
double-array{ 1.0 2.0 } [ dup ] H{ } map>assoc
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ { 3 } ] [
|
[ { 3 } ] [
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
IN: generic.standard.tests
|
IN: generic.standard.tests
|
||||||
USING: tools.test math math.functions math.constants
|
USING: tools.test math math.functions math.constants
|
||||||
generic.standard strings sequences arrays kernel accessors
|
generic.standard strings sequences arrays kernel accessors words
|
||||||
words float-arrays byte-arrays bit-arrays parser namespaces make
|
specialized-arrays.double byte-arrays bit-arrays parser
|
||||||
quotations stack-checker vectors growable hashtables sbufs
|
namespaces make quotations stack-checker vectors growable
|
||||||
prettyprint byte-vectors bit-vectors float-vectors definitions
|
hashtables sbufs prettyprint byte-vectors bit-vectors
|
||||||
generic sets graphs assocs ;
|
specialized-vectors.double definitions generic sets graphs assocs ;
|
||||||
|
|
||||||
GENERIC: lo-tag-test ( obj -- obj' )
|
GENERIC: lo-tag-test ( obj -- obj' )
|
||||||
|
|
||||||
|
@ -110,14 +110,14 @@ M: circle big-mix-test drop "circle" ;
|
||||||
[ "integer" ] [ 3 big-mix-test ] unit-test
|
[ "integer" ] [ 3 big-mix-test ] unit-test
|
||||||
[ "float" ] [ 5.0 big-mix-test ] unit-test
|
[ "float" ] [ 5.0 big-mix-test ] unit-test
|
||||||
[ "complex" ] [ -1 sqrt big-mix-test ] unit-test
|
[ "complex" ] [ -1 sqrt big-mix-test ] unit-test
|
||||||
[ "sequence" ] [ F{ 1.0 2.0 3.0 } big-mix-test ] unit-test
|
[ "sequence" ] [ double-array{ 1.0 2.0 3.0 } big-mix-test ] unit-test
|
||||||
[ "sequence" ] [ B{ 1 2 3 } big-mix-test ] unit-test
|
[ "sequence" ] [ B{ 1 2 3 } big-mix-test ] unit-test
|
||||||
[ "sequence" ] [ ?{ t f t } big-mix-test ] unit-test
|
[ "sequence" ] [ ?{ t f t } big-mix-test ] unit-test
|
||||||
[ "sequence" ] [ SBUF" hello world" big-mix-test ] unit-test
|
[ "sequence" ] [ SBUF" hello world" big-mix-test ] unit-test
|
||||||
[ "sequence" ] [ V{ "a" "b" } big-mix-test ] unit-test
|
[ "sequence" ] [ V{ "a" "b" } big-mix-test ] unit-test
|
||||||
[ "sequence" ] [ BV{ 1 2 } big-mix-test ] unit-test
|
[ "sequence" ] [ BV{ 1 2 } big-mix-test ] unit-test
|
||||||
[ "sequence" ] [ ?V{ t t f f } big-mix-test ] unit-test
|
[ "sequence" ] [ ?V{ t t f f } big-mix-test ] unit-test
|
||||||
[ "sequence" ] [ FV{ -0.3 4.6 } big-mix-test ] unit-test
|
[ "sequence" ] [ double-vector{ -0.3 4.6 } big-mix-test ] unit-test
|
||||||
[ "string" ] [ "hello" big-mix-test ] unit-test
|
[ "string" ] [ "hello" big-mix-test ] unit-test
|
||||||
[ "rectangle" ] [ 1 2 <rectangle> big-mix-test ] unit-test
|
[ "rectangle" ] [ 1 2 <rectangle> big-mix-test ] unit-test
|
||||||
[ "parallelogram" ] [ 10 4 3 <parallelogram> big-mix-test ] unit-test
|
[ "parallelogram" ] [ 10 4 3 <parallelogram> big-mix-test ] unit-test
|
||||||
|
@ -133,13 +133,13 @@ M: string small-lo-tag drop "string" ;
|
||||||
|
|
||||||
M: array small-lo-tag drop "array" ;
|
M: array small-lo-tag drop "array" ;
|
||||||
|
|
||||||
M: float-array small-lo-tag drop "float-array" ;
|
M: double-array small-lo-tag drop "double-array" ;
|
||||||
|
|
||||||
M: byte-array small-lo-tag drop "byte-array" ;
|
M: byte-array small-lo-tag drop "byte-array" ;
|
||||||
|
|
||||||
[ "fixnum" ] [ 3 small-lo-tag ] unit-test
|
[ "fixnum" ] [ 3 small-lo-tag ] unit-test
|
||||||
|
|
||||||
[ "float-array" ] [ F{ 1.0 } small-lo-tag ] unit-test
|
[ "double-array" ] [ double-array{ 1.0 } small-lo-tag ] unit-test
|
||||||
|
|
||||||
! Testing next-method
|
! Testing next-method
|
||||||
TUPLE: person ;
|
TUPLE: person ;
|
||||||
|
|
Loading…
Reference in New Issue