: call-test ( q -- ) call( -- ) ;
-[ ] [ [ ] call-test ] unit-test
-[ ] [ f [ drop ] curry call-test ] unit-test
-[ ] [ [ ] [ ] compose call-test ] unit-test
+{ } [ [ ] call-test ] unit-test
+{ } [ f [ drop ] curry call-test ] unit-test
+{ } [ [ ] [ ] compose call-test ] unit-test
[ [ 1 2 3 ] call-test ] [ wrong-values? ] must-fail-with
locals random ;
IN: compiler.tests.curry
-[ 3 ] [ 5 [ [ 2 - ] curry call ] compile-call ] unit-test
-[ 3 ] [ [ 5 [ 2 - ] curry call ] compile-call ] unit-test
-[ 3 ] [ [ 5 2 [ - ] 2curry call ] compile-call ] unit-test
-[ 3 ] [ 5 [ 2 [ - ] 2curry call ] compile-call ] unit-test
-[ 3 ] [ 5 2 [ [ - ] 2curry call ] compile-call ] unit-test
-[ 3 ] [ 5 2 [ [ - ] 2curry 9 swap call /i ] compile-call ] unit-test
-[ 3 ] [ 5 2 [ [ - ] 2curry [ 9 ] dip call /i ] compile-call ] unit-test
-
-[ -10 -20 ] [ 10 20 -1 [ [ * ] curry bi@ ] compile-call ] unit-test
-
-[ [ 5 2 - ] ] [ 5 [ [ 2 - ] curry ] compile-call >quotation ] unit-test
-[ [ 5 2 - ] ] [ [ 5 [ 2 - ] curry ] compile-call >quotation ] unit-test
-[ [ 5 2 - ] ] [ [ 5 2 [ - ] 2curry ] compile-call >quotation ] unit-test
-[ [ 5 2 - ] ] [ 5 [ 2 [ - ] 2curry ] compile-call >quotation ] unit-test
-[ [ 5 2 - ] ] [ 5 2 [ [ - ] 2curry ] compile-call >quotation ] unit-test
-
-[ [ 6 2 + ] ]
-[
+{ 3 } [ 5 [ [ 2 - ] curry call ] compile-call ] unit-test
+{ 3 } [ [ 5 [ 2 - ] curry call ] compile-call ] unit-test
+{ 3 } [ [ 5 2 [ - ] 2curry call ] compile-call ] unit-test
+{ 3 } [ 5 [ 2 [ - ] 2curry call ] compile-call ] unit-test
+{ 3 } [ 5 2 [ [ - ] 2curry call ] compile-call ] unit-test
+{ 3 } [ 5 2 [ [ - ] 2curry 9 swap call /i ] compile-call ] unit-test
+{ 3 } [ 5 2 [ [ - ] 2curry [ 9 ] dip call /i ] compile-call ] unit-test
+
+{ -10 -20 } [ 10 20 -1 [ [ * ] curry bi@ ] compile-call ] unit-test
+
+{ [ 5 2 - ] } [ 5 [ [ 2 - ] curry ] compile-call >quotation ] unit-test
+{ [ 5 2 - ] } [ [ 5 [ 2 - ] curry ] compile-call >quotation ] unit-test
+{ [ 5 2 - ] } [ [ 5 2 [ - ] 2curry ] compile-call >quotation ] unit-test
+{ [ 5 2 - ] } [ 5 [ 2 [ - ] 2curry ] compile-call >quotation ] unit-test
+{ [ 5 2 - ] } [ 5 2 [ [ - ] 2curry ] compile-call >quotation ] unit-test
+
+{ [ 6 2 + ] } [
2 5
[ [ [ + ] curry ] dip 0 < [ -2 ] [ 6 ] if swap curry ]
compile-call >quotation
] unit-test
-[ 8 ]
-[
+{ 8 } [
2 5
[ [ [ + ] curry ] dip 0 < [ -2 ] [ 6 ] if swap curry call ]
compile-call
: foobar ( quot: ( ..a -- ..b ) -- )
[ call ] keep swap [ foobar ] [ drop ] if ; inline recursive
-[ ] [ [ [ f ] foobar ] compile-call ] unit-test
+{ } [ [ [ f ] foobar ] compile-call ] unit-test
-[ { 6 7 8 } ] [ { 1 2 3 } 5 [ [ + ] curry map ] compile-call ] unit-test
-[ { 6 7 8 } ] [ { 1 2 3 } [ 5 [ + ] curry map ] compile-call ] unit-test
+{ { 6 7 8 } } [ { 1 2 3 } 5 [ [ + ] curry map ] compile-call ] unit-test
+{ { 6 7 8 } } [ { 1 2 3 } [ 5 [ + ] curry map ] compile-call ] unit-test
: funky-assoc>map ( assoc quot -- seq )
[
[ call f ] curry assoc-find 3drop
] { } make ; inline
-[ t ] [| |
+{ t } [| |
1000 <iota> [ drop 1,000,000 random 1,000,000 random ] H{ } map>assoc :> a-hashtable
a-hashtable [ [ drop , ] funky-assoc>map ] compile-call
a-hashtable keys =
] unit-test
-[ 3 ] [ 1 [ 2 ] [ curry [ 3 ] [ 4 ] if ] compile-call ] unit-test
+{ 3 } [ 1 [ 2 ] [ curry [ 3 ] [ 4 ] if ] compile-call ] unit-test
-[ 3 ] [ t [ 3 [ ] curry 4 [ ] curry if ] compile-call ] unit-test
+{ 3 } [ t [ 3 [ ] curry 4 [ ] curry if ] compile-call ] unit-test
-[ 3 ] [ t [ 3 [ ] curry [ 4 ] if ] compile-call ] unit-test
+{ 3 } [ t [ 3 [ ] curry [ 4 ] if ] compile-call ] unit-test
-[ 4 ] [ f [ 3 [ ] curry 4 [ ] curry if ] compile-call ] unit-test
+{ 4 } [ f [ 3 [ ] curry 4 [ ] curry if ] compile-call ] unit-test
-[ 4 ] [ f [ [ 3 ] 4 [ ] curry if ] compile-call ] unit-test
+{ 4 } [ f [ [ 3 ] 4 [ ] curry if ] compile-call ] unit-test
: test-outputs1 ( a b -- ) /i drop ;
: test-outputs2 ( a b -- ) mod drop ;
-[ ] [ 10 3 test-outputs0 ] unit-test
-[ ] [ 10 3 test-outputs1 ] unit-test
-[ ] [ 10 3 test-outputs2 ] unit-test
+{ } [ 10 3 test-outputs0 ] unit-test
+{ } [ 10 3 test-outputs1 ] unit-test
+{ } [ 10 3 test-outputs2 ] unit-test
! Calls to generic words were not folded away.
-[ ] [ [ "compiler.tests.redefine11" forget-vocab ] with-compilation-unit ] unit-test
+{ } [ [ "compiler.tests.redefine11" forget-vocab ] with-compilation-unit ] unit-test
-[ ] [
+{ } [
"USING: math arrays ;
IN: compiler.tests.folding
GENERIC: foldable-generic ( a -- b ) foldable
eval( -- )
] unit-test
-[ ] [
+{ } [
"USING: math arrays ;
IN: compiler.tests.folding
: fold-test ( -- x ) 10 foldable-generic ;"
eval( -- )
] unit-test
-[ t ] [
+{ t } [
"fold-test" "compiler.tests.folding" lookup-word execute
"fold-test" "compiler.tests.folding" lookup-word execute
eq?
[ test-2 ] [ not-compiled? ] must-fail-with
-[ ] [ "IN: compiler.tests.redefine0 : test-1 ( -- ) ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine0 : test-1 ( -- ) ;" eval( -- ) ] unit-test
{ 0 0 } [ test-1 ] must-infer-as
-[ ] [ test-2 ] unit-test
+{ } [ test-2 ] unit-test
-[ ] [
+{ } [
[
\ test-1 forget
\ test-2 forget
: test-3 ( a -- ) drop ;
: test-4 ( -- ) [ 1 2 3 ] test-3 ;
-[ ] [ test-4 ] unit-test
+{ } [ test-4 ] unit-test
-[ ] [ "IN: compiler.tests.redefine0 USE: kernel : test-3 ( a -- ) call ; inline" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine0 USE: kernel : test-3 ( a -- ) call ; inline" eval( -- ) ] unit-test
[ test-4 ] [ not-compiled? ] must-fail-with
-[ ] [
+{ } [
[
\ test-3 forget
\ test-4 forget
: test-5 ( a -- quot ) ;
: test-6 ( a -- b ) test-5 ;
-[ 31337 ] [ 31337 test-6 ] unit-test
+{ 31337 } [ 31337 test-6 ] unit-test
-[ ] [ "IN: compiler.tests.redefine0 USING: macros kernel ; MACRO: test-5 ( a -- quot ) drop [ ] ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine0 USING: macros kernel ; MACRO: test-5 ( a -- quot ) drop [ ] ;" eval( -- ) ] unit-test
[ 31337 test-6 ] [ not-compiled? ] must-fail-with
-[ ] [
+{ } [
[
\ test-5 forget
\ test-6 forget
[ 1 test-7 ] [ not-compiled? ] must-fail-with
[ 1 test-8 ] [ not-compiled? ] must-fail-with
-[ ] [ "IN: compiler.tests.redefine0 USING: macros math kernel ; GENERIC: test-7 ( x y -- z ) : test-8 ( a b -- c ) 255 bitand test-7 ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine0 USING: macros math kernel ; GENERIC: test-7 ( x y -- z ) : test-8 ( a b -- c ) 255 bitand test-7 ;" eval( -- ) ] unit-test
-[ 4 ] [ 1 3 test-7 ] unit-test
-[ 4 ] [ 1 259 test-8 ] unit-test
+{ 4 } [ 1 3 test-7 ] unit-test
+{ 4 } [ 1 259 test-8 ] unit-test
-[ ] [
+{ } [
[
\ test-7 forget
\ test-8 forget
MACRO: test-10 ( -- quot ) quot get ; >>
: test-11 ( -- ) test-10 ;
-[ ] [ test-11 ] unit-test
+{ } [ test-11 ] unit-test
-[ ] [ "IN: compiler.tests.redefine0 : test-9 ( -- ) 1 ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine0 : test-9 ( -- ) 1 ;" eval( -- ) ] unit-test
! test-11 should get recompiled now
[ test-11 ] [ not-compiled? ] must-fail-with
-[ ] [ "IN: compiler.tests.redefine0 : test-9 ( -- a ) 1 ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine0 : test-9 ( -- a ) 1 ;" eval( -- ) ] unit-test
-[ ] [ "IN: compiler.tests.redefine0 : test-9 ( -- ) ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine0 : test-9 ( -- ) ;" eval( -- ) ] unit-test
-[ ] [ test-11 ] unit-test
+{ } [ test-11 ] unit-test
quot global delete-at
-[ ] [
+{ } [
[
\ test-9 forget
\ test-10 forget
: method-redefine-test-1 ( -- b ) 3 method-redefine-generic-1 ;
-[ 6 ] [ method-redefine-test-1 ] unit-test
+{ 6 } [ method-redefine-test-1 ] unit-test
-[ ] [ "IN: compiler.tests.redefine1 USE: math M: fixnum method-redefine-generic-1 4 + ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine1 USE: math M: fixnum method-redefine-generic-1 4 + ;" eval( -- ) ] unit-test
-[ 7 ] [ method-redefine-test-1 ] unit-test
+{ 7 } [ method-redefine-test-1 ] unit-test
-[ ] [ [ fixnum \ method-redefine-generic-1 lookup-method forget ] with-compilation-unit ] unit-test
+{ } [ [ fixnum \ method-redefine-generic-1 lookup-method forget ] with-compilation-unit ] unit-test
-[ 6 ] [ method-redefine-test-1 ] unit-test
+{ 6 } [ method-redefine-test-1 ] unit-test
GENERIC: method-redefine-generic-2 ( a -- b )
: method-redefine-test-2 ( -- b ) 3 method-redefine-generic-2 ;
-[ 6 ] [ method-redefine-test-2 ] unit-test
+{ 6 } [ method-redefine-test-2 ] unit-test
-[ ] [ "IN: compiler.tests.redefine1 USE: kernel USE: math M: fixnum method-redefine-generic-2 4 + ; USE: strings M: string method-redefine-generic-2 drop f ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine1 USE: kernel USE: math M: fixnum method-redefine-generic-2 4 + ; USE: strings M: string method-redefine-generic-2 drop f ;" eval( -- ) ] unit-test
-[ 7 ] [ method-redefine-test-2 ] unit-test
+{ 7 } [ method-redefine-test-2 ] unit-test
-[ ] [
+{ } [
[
fixnum string [ \ method-redefine-generic-2 lookup-method forget ] bi@
] with-compilation-unit
: my-baked-inline-3 ( a -- b ) { my-mixin } declare fake-float? ;
-[ f ] [ 5 my-inline-3 ] unit-test
+{ f } [ 5 my-inline-3 ] unit-test
-[ f ] [ 5 my-fake-inline-3 ] unit-test
+{ f } [ 5 my-fake-inline-3 ] unit-test
-[ f ] [ 5 my-baked-inline-3 ] unit-test
+{ f } [ 5 my-baked-inline-3 ] unit-test
-[ f ] [ 5 my-inline-4 ] unit-test
+{ f } [ 5 my-inline-4 ] unit-test
-[ t ] [ 5 my-inline-5 ] unit-test
+{ t } [ 5 my-inline-5 ] unit-test
-[ t ] [ 5 my-inline-6 ] unit-test
+{ t } [ 5 my-inline-6 ] unit-test
-[ ] [ [ float my-mixin add-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ float my-mixin add-mixin-instance ] with-compilation-unit ] unit-test
-[ 2.0 ] [ 1.0 my-inline-1 ] unit-test
+{ 2.0 } [ 1.0 my-inline-1 ] unit-test
-[ 2.0 ] [ 1.0 my-inline-2 ] unit-test
+{ 2.0 } [ 1.0 my-inline-2 ] unit-test
-[ t ] [ 1.0 my-inline-3 ] unit-test
+{ t } [ 1.0 my-inline-3 ] unit-test
-[ t ] [ 1.0 my-fake-inline-3 ] unit-test
+{ t } [ 1.0 my-fake-inline-3 ] unit-test
-[ t ] [ 1.0 my-baked-inline-3 ] unit-test
+{ t } [ 1.0 my-baked-inline-3 ] unit-test
-[ t ] [ 1.0 my-inline-4 ] unit-test
+{ t } [ 1.0 my-inline-4 ] unit-test
-[ f ] [ 1.0 my-inline-5 ] unit-test
+{ f } [ 1.0 my-inline-5 ] unit-test
-[ f ] [ 1.0 my-inline-6 ] unit-test
+{ f } [ 1.0 my-inline-6 ] unit-test
-[ ] [ [ fixnum my-mixin remove-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ fixnum my-mixin remove-mixin-instance ] with-compilation-unit ] unit-test
-[ f ] [ 5 my-inline-3 ] unit-test
+{ f } [ 5 my-inline-3 ] unit-test
-[ f ] [ 5 my-fake-inline-3 ] unit-test
+{ f } [ 5 my-fake-inline-3 ] unit-test
-[ f ] [ 5 my-baked-inline-3 ] unit-test
+{ f } [ 5 my-baked-inline-3 ] unit-test
-[ f ] [ 5 my-inline-4 ] unit-test
+{ f } [ 5 my-inline-4 ] unit-test
-[ f ] [ 5 my-inline-5 ] unit-test
+{ f } [ 5 my-inline-5 ] unit-test
-[ f ] [ 5 my-inline-6 ] unit-test
+{ f } [ 5 my-inline-6 ] unit-test
-[ ] [ [ float my-mixin remove-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ float my-mixin remove-mixin-instance ] with-compilation-unit ] unit-test
-[ 1.0 ] [ 1.0 my-inline-1 ] unit-test
+{ 1.0 } [ 1.0 my-inline-1 ] unit-test
-[ 1.0 ] [ 1.0 my-inline-2 ] unit-test
+{ 1.0 } [ 1.0 my-inline-2 ] unit-test
-[ f ] [ 1.0 my-inline-3 ] unit-test
+{ f } [ 1.0 my-inline-3 ] unit-test
-[ f ] [ 1.0 my-fake-inline-3 ] unit-test
+{ f } [ 1.0 my-fake-inline-3 ] unit-test
-[ f ] [ 1.0 my-inline-4 ] unit-test
+{ f } [ 1.0 my-inline-4 ] unit-test
-[ f ] [ 1.0 my-inline-5 ] unit-test
+{ f } [ 1.0 my-inline-5 ] unit-test
-[ f ] [ 1.0 my-inline-6 ] unit-test
+{ f } [ 1.0 my-inline-6 ] unit-test
! Mixin redefinition did not recompile all necessary words.
-[ ] [ [ "compiler.tests.redefine11" forget-vocab ] with-compilation-unit ] unit-test
+{ } [ [ "compiler.tests.redefine11" forget-vocab ] with-compilation-unit ] unit-test
-[ ] [
+{ } [
"USING: kernel math classes arrays ;
IN: compiler.tests.redefine11
MIXIN: my-mixin
eval( -- )
] unit-test
-[ ] [
+{ } [
[
array "my-mixin" "compiler.tests.redefine11" lookup-word
remove-mixin-instance
] with-compilation-unit
] unit-test
-[ 1 ] [
+{ 1 } [
"my-inline" "compiler.tests.redefine11" lookup-word execute
] unit-test
: h ( a -- b ) dup [ g ] when ;
-[ f ] [ f h ] unit-test
-[ t ] [ "hi" h ] unit-test
+{ f } [ f h ] unit-test
+{ t } [ "hi" h ] unit-test
TUPLE: jeah ;
-[ ] [ "USE: kernel IN: compiler.tests.redefine12 M: jeah g drop f ;" eval( -- ) ] unit-test
+{ } [ "USE: kernel IN: compiler.tests.redefine12 M: jeah g drop f ;" eval( -- ) ] unit-test
-[ f ] [ T{ jeah } h ] unit-test
+{ f } [ T{ jeah } h ] unit-test
M: bad length 1 2 3 ;
-[ ] [ [ M\ bad length forget ] with-compilation-unit ] unit-test
+{ } [ [ M\ bad length forget ] with-compilation-unit ] unit-test
quotations stack-checker ;
IN: compiler.tests.redefine16
-[ ] [ [ "blah" "compiler.tests.redefine16" lookup-word forget ] with-compilation-unit ] unit-test
+{ } [ [ "blah" "compiler.tests.redefine16" lookup-word forget ] with-compilation-unit ] unit-test
-[ ] [ "IN: compiler.tests.redefine16 GENERIC#: blah 2 ( foo bar baz -- )" eval( -- ) ] unit-test
-[ ] [ "IN: compiler.tests.redefine16 USING: strings math arrays prettyprint ; M: string blah 1 + 3array . ;" eval( -- ) ] unit-test
-[ ] [ "IN: compiler.tests.redefine16 GENERIC#: blah 2 ( foo bar baz -- x )" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine16 GENERIC#: blah 2 ( foo bar baz -- )" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine16 USING: strings math arrays prettyprint ; M: string blah 1 + 3array . ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine16 GENERIC#: blah 2 ( foo bar baz -- x )" eval( -- ) ] unit-test
-[ ] [ [ "blah" "compiler.tests.redefine16" lookup-word forget ] with-compilation-unit ] unit-test
+{ } [ [ "blah" "compiler.tests.redefine16" lookup-word forget ] with-compilation-unit ] unit-test
: blah ( a -- b ) { mixin } declare bong ;
-[ { } ] [ { } blah ] unit-test
+{ { } } [ { } blah ] unit-test
-[ ] [ [ \ array \ mixin remove-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ \ array \ mixin remove-mixin-instance ] with-compilation-unit ] unit-test
-[ ] [ [ \ string \ mixin add-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ \ string \ mixin add-mixin-instance ] with-compilation-unit ] unit-test
-[ 0 ] [ "" blah ] unit-test
+{ 0 } [ "" blah ] unit-test
MIXIN: mixin1
: bully ( a -- b ) { mixin1 } declare billy ;
-[ "" ] [ "" bully ] unit-test
+{ "" } [ "" bully ] unit-test
-[ ] [ [ \ string \ mixin1 remove-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ \ string \ mixin1 remove-mixin-instance ] with-compilation-unit ] unit-test
-[ ] [ [ \ array \ mixin1 add-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ \ array \ mixin1 add-mixin-instance ] with-compilation-unit ] unit-test
-[ "BILLY" ] [ { } bully ] unit-test
+{ "BILLY" } [ { } bully ] unit-test
M: d g2 drop d ;
-[ ] [ "IN: compiler.tests.redefine18 SINGLETON: b INSTANCE: b d" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine18 SINGLETON: b INSTANCE: b d" eval( -- ) ] unit-test
-[ d ] [ "b" "compiler.tests.redefine18" lookup-word g1 ] unit-test
+{ d } [ "b" "compiler.tests.redefine18" lookup-word g1 ] unit-test
-[ ] [ "IN: compiler.tests.redefine18 FORGET: b" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine18 FORGET: b" eval( -- ) ] unit-test
: foo ( -- b ) c new g ;
-[ 2 ] [ foo ] unit-test
+{ 2 } [ foo ] unit-test
-[ ] [ [ c m1 add-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ c m1 add-mixin-instance ] with-compilation-unit ] unit-test
-[ { m2 m1 } ] [ \ g order ] unit-test
+{ { m2 m1 } } [ \ g order ] unit-test
-[ 1 ] [ foo ] unit-test
+{ 1 } [ foo ] unit-test
-[ ] [ [ c m1 remove-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ c m1 remove-mixin-instance ] with-compilation-unit ] unit-test
DEFER: redefine2-test
-[ ] [ "USE: sequences USE: kernel IN: compiler.tests.redefine2 TUPLE: redefine2-test ; M: redefine2-test nth 2drop 3 ; INSTANCE: redefine2-test sequence" eval( -- ) ] unit-test
+{ } [ "USE: sequences USE: kernel IN: compiler.tests.redefine2 TUPLE: redefine2-test ; M: redefine2-test nth 2drop 3 ; INSTANCE: redefine2-test sequence" eval( -- ) ] unit-test
-[ t ] [ \ redefine2-test symbol? ] unit-test
+{ t } [ \ redefine2-test symbol? ] unit-test
-[ t ] [ redefine2-test new sequence? ] unit-test
+{ t } [ redefine2-test new sequence? ] unit-test
-[ 3 ] [ 0 redefine2-test new nth-unsafe ] unit-test
+{ 3 } [ 0 redefine2-test new nth-unsafe ] unit-test
-[ ] [ [ redefine2-test sequence remove-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ redefine2-test sequence remove-mixin-instance ] with-compilation-unit ] unit-test
-[ f ] [ redefine2-test new sequence? ] unit-test
+{ f } [ redefine2-test new sequence? ] unit-test
[ 0 redefine2-test new nth-unsafe ] must-fail
M: funny cnm-recompile-test call-next-method ;
-[ object ] [ funny new cnm-recompile-test ] unit-test
+{ object } [ funny new cnm-recompile-test ] unit-test
-[ ] [ [ funny sequence add-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ funny sequence add-mixin-instance ] with-compilation-unit ] unit-test
-[ sequence ] [ funny new cnm-recompile-test ] unit-test
+{ sequence } [ funny new cnm-recompile-test ] unit-test
-[ ] [ [ funny sequence remove-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ funny sequence remove-mixin-instance ] with-compilation-unit ] unit-test
-[ object ] [ funny new cnm-recompile-test ] unit-test
+{ object } [ funny new cnm-recompile-test ] unit-test
USING: kernel tools.test definitions compiler.units ;
IN: compiler.tests.redefine21
-[ ] [ : a ( -- ) ; << : b ( quot -- ) call a ; inline >> [ ] b ] unit-test
+{ } [ : a ( -- ) ; << : b ( quot -- ) call a ; inline >> [ ] b ] unit-test
-[ ] [ [ { a b } forget-all ] with-compilation-unit ] unit-test
+{ } [ [ { a b } forget-all ] with-compilation-unit ] unit-test
-[ ] [ : A ( -- ) ; << : B ( -- ) A ; inline >> B ] unit-test
+{ } [ : A ( -- ) ; << : B ( -- ) A ; inline >> B ] unit-test
-[ ] [ [ { A B } forget-all ] with-compilation-unit ] unit-test
+{ } [ [ { A B } forget-all ] with-compilation-unit ] unit-test
: www-1 ( a -- b ) T{ ttt } new-sequence ;
! This used to break with a compiler error in the above word
-[ ] [ [ \ ttt forget ] with-compilation-unit ] unit-test
+{ } [ [ \ ttt forget ] with-compilation-unit ] unit-test
: compiled-use? ( key word -- ? )
load-dependencies member-eq? ;
-[ "sheeple" ] [ sheeple-test ] unit-test
-[ t ] [ \ sheeple-test word-optimized? ] unit-test
-[ t ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
-[ f ] [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
+{ "sheeple" } [ sheeple-test ] unit-test
+{ t } [ \ sheeple-test word-optimized? ] unit-test
+{ t } [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
+{ f } [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
-[ ] [ "IN: compiler.tests.redefine3 USE: arrays INSTANCE: array empty-mixin" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine3 USE: arrays INSTANCE: array empty-mixin" eval( -- ) ] unit-test
-[ "wake up" ] [ sheeple-test ] unit-test
-[ f ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
-[ t ] [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
+{ "wake up" } [ sheeple-test ] unit-test
+{ f } [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
+{ t } [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
-[ ] [ [ array empty-mixin remove-mixin-instance ] with-compilation-unit ] unit-test
+{ } [ [ array empty-mixin remove-mixin-instance ] with-compilation-unit ] unit-test
-[ "sheeple" ] [ sheeple-test ] unit-test
-[ t ] [ \ sheeple-test word-optimized? ] unit-test
-[ t ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
-[ f ] [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
+{ "sheeple" } [ sheeple-test ] unit-test
+{ t } [ \ sheeple-test word-optimized? ] unit-test
+{ t } [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
+{ f } [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
: declaration-test ( -- ) declaration-test-1 drop ;
-[ "" ] [ [ declaration-test ] with-string-writer ] unit-test
+{ "" } [ [ declaration-test ] with-string-writer ] unit-test
-[ ] [ "IN: compiler.tests.redefine4 USE: io : declaration-test-1 ( -- a ) \"X\" write f ;" eval( -- ) ] unit-test
+{ } [ "IN: compiler.tests.redefine4 USE: io : declaration-test-1 ( -- a ) \"X\" write f ;" eval( -- ) ] unit-test
-[ "X" ] [ [ declaration-test ] with-string-writer ] unit-test
+{ "X" } [ [ declaration-test ] with-string-writer ] unit-test
! Mixin redefinition did not recompile all necessary words.
-[ ] [ [ "compiler.tests.redefine6" forget-vocab ] with-compilation-unit ] unit-test
+{ } [ [ "compiler.tests.redefine6" forget-vocab ] with-compilation-unit ] unit-test
-[ ] [
+{ } [
"USING: kernel kernel.private ;
IN: compiler.tests.redefine6
GENERIC: my-generic ( a -- b )
eval( -- )
] unit-test
-[ ] [
+{ } [
"USING: kernel ;
IN: compiler.tests.redefine6
TUPLE: my-tuple ;
eval( -- )
] unit-test
-[ 1 ] [
+{ 1 } [
"my-tuple" "compiler.tests.redefine6" lookup-word boa
"my-inline" "compiler.tests.redefine6" lookup-word execute
] unit-test
! Mixin redefinition did not recompile all necessary words.
-[ ] [ [ "compiler.tests.redefine7" forget-vocab ] with-compilation-unit ] unit-test
+{ } [ [ "compiler.tests.redefine7" forget-vocab ] with-compilation-unit ] unit-test
-[ ] [
+{ } [
"USING: kernel math ;
IN: compiler.tests.redefine7
MIXIN: my-mixin
eval( -- )
] unit-test
-[ ] [
+{ } [
"USE: math
IN: compiler.tests.redefine7
INSTANCE: float my-mixin"
eval( -- )
] unit-test
-[ 2.0 ] [
+{ 2.0 } [
1.0 "my-inline" "compiler.tests.redefine7" lookup-word execute
] unit-test
! Mixin redefinition did not recompile all necessary words.
-[ ] [ [ "compiler.tests.redefine8" forget-vocab ] with-compilation-unit ] unit-test
+{ } [ [ "compiler.tests.redefine8" forget-vocab ] with-compilation-unit ] unit-test
-[ ] [
+{ } [
"USING: kernel math math.order sorting ;
IN: compiler.tests.redefine8
MIXIN: my-mixin
eval( -- )
] unit-test
-[ ] [
+{ } [
"USE: math
IN: compiler.tests.redefine8
INSTANCE: float my-mixin"
eval( -- )
] unit-test
-[ 2.0 ] [
+{ 2.0 } [
1.0 "my-generic" "compiler.tests.redefine8" lookup-word execute
] unit-test
! Mixin redefinition did not recompile all necessary words.
-[ ] [ [ "compiler.tests.redefine9" forget-vocab ] with-compilation-unit ] unit-test
+{ } [ [ "compiler.tests.redefine9" forget-vocab ] with-compilation-unit ] unit-test
-[ ] [
+{ } [
"USING: kernel math math.order sorting ;
IN: compiler.tests.redefine9
MIXIN: my-mixin
eval( -- )
] unit-test
-[ ] [
+{ } [
"USE: math
IN: compiler.tests.redefine9
TUPLE: my-tuple ;
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test io.files.info.windows system kernel ;
-[ ] [ vm-path file-times 3drop ] unit-test
+{ } [ vm-path file-times 3drop ] unit-test
splitting system tools.test ;
IN: io.launcher.windows.tests
-[ "hello world" ] [ { "hello" "world" } join-arguments ] unit-test
+{ "hello world" } [ { "hello" "world" } join-arguments ] unit-test
-[ "bob \"mac arthur\"" ] [ { "bob" "mac arthur" } join-arguments ] unit-test
+{ "bob \"mac arthur\"" } [ { "bob" "mac arthur" } join-arguments ] unit-test
-[ "bob mac\\\\arthur" ] [ { "bob" "mac\\\\arthur" } join-arguments ] unit-test
+{ "bob mac\\\\arthur" } [ { "bob" "mac\\\\arthur" } join-arguments ] unit-test
-[ "bob \"mac arthur\\\\\"" ] [ { "bob" "mac arthur\\" } join-arguments ] unit-test
+{ "bob \"mac arthur\\\\\"" } [ { "bob" "mac arthur\\" } join-arguments ] unit-test
! Bug #245
-[ "\\\"hi\\\"" ] [ { "\"hi\"" } join-arguments ] unit-test
+{ "\\\"hi\\\"" } [ { "\"hi\"" } join-arguments ] unit-test
-[ "\"\\\"hi you\\\"\"" ] [ { "\"hi you\"" } join-arguments ] unit-test
+{ "\"\\\"hi you\\\"\"" } [ { "\"hi you\"" } join-arguments ] unit-test
! Commented line -- what should appear on the command line
! \foo\\bar\\\bas\ -> \foo\\bar\\\bas\
-[ "\\foo\\\\bar\\\\\\bas\\" ]
+{ "\\foo\\\\bar\\\\\\bas\\" }
[ { "\\foo\\\\bar\\\\\\bas\\" } join-arguments ] unit-test
! \"foo"\\bar\\\bas\ -> \\\"foo\"\\bar\\\bas\
-[ "\\\\\\\"foo\\\"\\\\bar\\\\\\bas\\" ]
+{ "\\\\\\\"foo\\\"\\\\bar\\\\\\bas\\" }
[ { "\\\"foo\"\\\\bar\\\\\\bas\\" } join-arguments ] unit-test
! \foo\\"bar"\\\bas\ -> \foo\\\\\"bar\"\\\bas\
-[ "\\foo\\\\\\\\\\\"bar\\\"\\\\\\bas\\" ]
+{ "\\foo\\\\\\\\\\\"bar\\\"\\\\\\bas\\" }
[ { "\\foo\\\\\"bar\"\\\\\\bas\\" } join-arguments ] unit-test
! \foo\\bar\\\"bas"\ -> \foo\\bar\\\\\\\"bas\"\
-[ "\\foo\\\\bar\\\\\\\\\\\\\\\"bas\\\"\\" ]
+{ "\\foo\\\\bar\\\\\\\\\\\\\\\"bas\\\"\\" }
[ { "\\foo\\\\bar\\\\\\\"bas\"\\" } join-arguments ] unit-test
! \foo\\bar bar\\\bas\ -> "\foo\\bar bar\\\bas\\"
-[ "\"\\foo\\\\bar bar\\\\\\bas\\\\\"" ]
+{ "\"\\foo\\\\bar bar\\\\\\bas\\\\\"" }
[ { "\\foo\\\\bar bar\\\\\\bas\\" } join-arguments ] unit-test
-[ ] [
+{ } [
<process>
"notepad" >>command
1/2 seconds >>timeout
"notepad" set
] unit-test
-[ f ] [ "notepad" get process-running? ] unit-test
+{ f } [ "notepad" get process-running? ] unit-test
-[ f ] [ "notepad" get process-started? ] unit-test
+{ f } [ "notepad" get process-started? ] unit-test
-[ ] [ "notepad" [ run-detached ] change ] unit-test
+{ } [ "notepad" [ run-detached ] change ] unit-test
[ "notepad" get wait-for-process ] must-fail
-[ t ] [ "notepad" get killed>> ] unit-test
+{ t } [ "notepad" get killed>> ] unit-test
-[ f ] [ "notepad" get process-running? ] unit-test
+{ f } [ "notepad" get process-running? ] unit-test
[
<process>
SYMBOLS: out-path err-path ;
-[ ] [
+{ } [
<process>
console-vm-path "-run=hello-world" 2array >>command
[ "out" ".txt" unique-file ] with-temp-directory
try-process
] unit-test
-[ "Hello world" ] [
+{ "Hello world" } [
out-path get-global ascii file-lines first
] unit-test
-[ "IN: scratchpad " ] [
+{ "IN: scratchpad " } [
<process>
console-vm-path "-run=listener" 2array >>command
+closed+ >>stdin
: launcher-test-path ( -- str )
"resource:basis/io/launcher/windows/test" ;
-[ ] [
+{ } [
launcher-test-path [
<process>
console-vm-path "-script" "stderr.factor" 3array >>command
] with-directory
] unit-test
-[ "output" ] [
+{ "output" } [
out-path get-global ascii file-lines first
] unit-test
-[ "error" ] [
+{ "error" } [
err-path get-global ascii file-lines first
] unit-test
-[ ] [
+{ } [
launcher-test-path [
<process>
console-vm-path "-script" "stderr.factor" 3array >>command
] with-directory
] unit-test
-[ "outputerror" ] [
+{ "outputerror" } [
out-path get-global ascii file-lines first
] unit-test
-[ "output" ] [
+{ "output" } [
launcher-test-path [
<process>
console-vm-path "-script" "stderr.factor" 3array >>command
] with-directory
] unit-test
-[ "error" ] [
+{ "error" } [
err-path get-global ascii file-lines first
] unit-test
-
-
-[ t ] [
+{ t } [
launcher-test-path [
<process>
console-vm-path "-script" "env.factor" 3array >>command
os-envs =
] unit-test
-[ t ] [
+{ t } [
launcher-test-path [
<process>
console-vm-path "-script" "env.factor" 3array >>command
os-envs =
] unit-test
-[ "B" ] [
+{ "B" } [
launcher-test-path [
<process>
console-vm-path "-script" "env.factor" 3array >>command
"A" of
] unit-test
-[ f ] [
+{ f } [
launcher-test-path [
<process>
console-vm-path "-script" "env.factor" 3array >>command
] unit-test
2 [
- [ ] [
+ { } [
<process>
"cmd.exe /c dir" >>command
[ "dir" ".txt" unique-file ] with-temp-directory
try-process
] unit-test
- [ ] [ out-path get-global delete-file ] unit-test
+ { } [ out-path get-global delete-file ] unit-test
] times
{ "Hello appender\r\nÖrjan ågren är åter\r\nHello appender\r\nÖrjan ågren är åter\r\n" } [
"cmd /c echo.This is a hidden process." utf8 (process-stream) hidden>> swap stream-contents
] unit-test
-[ "IN: scratchpad " ] [
+{ "IN: scratchpad " } [
console-vm-path "-run=listener" 2array
ascii [ "USE: system 0 exit" print flush read-lines last ] with-process-stream
] unit-test
-[ ] [
+{ } [
console-vm-path "-run=listener" 2array
ascii [ "USE: system 0 exit" print ] with-process-writer
] unit-test
-[ ] [
+{ } [
<process>
console-vm-path "-run=listener" 2array >>command
"vocab:io/launcher/windows/test/input.txt" >>stdin
[ "you-cant-resolve-me!" resolve-host ] [ addrinfo-error? ] must-fail-with
-[ ] [ B{ 1 2 3 } f 9000 <inet4> send-once ] unit-test
-[ ] [ B{ 1 2 3 } f 9000 <inet4> broadcast-once ] unit-test
-[ ] [ B{ 1 2 3 } "0.0.0.0" 9000 <inet4> send-once ] unit-test
-[ ] [ B{ 1 2 3 } "0.0.0.0" 9000 <inet4> broadcast-once ] unit-test
+{ } [ B{ 1 2 3 } f 9000 <inet4> send-once ] unit-test
+{ } [ B{ 1 2 3 } f 9000 <inet4> broadcast-once ] unit-test
+{ } [ B{ 1 2 3 } "0.0.0.0" 9000 <inet4> send-once ] unit-test
+{ } [ B{ 1 2 3 } "0.0.0.0" 9000 <inet4> broadcast-once ] unit-test
ipv6-supported? [
- [ ] [ B{ 1 2 3 } f 9000 <inet6> send-once ] unit-test
- [ ] [ B{ 1 2 3 } f 9000 <inet6> broadcast-once ] unit-test
- [ ] [ B{ 1 2 3 } "::" 9000 <inet6> send-once ] unit-test
- [ ] [ B{ 1 2 3 } "::" 9000 <inet6> broadcast-once ] unit-test
+ { } [ B{ 1 2 3 } f 9000 <inet6> send-once ] unit-test
+ { } [ B{ 1 2 3 } f 9000 <inet6> broadcast-once ] unit-test
+ { } [ B{ 1 2 3 } "::" 9000 <inet6> send-once ] unit-test
+ { } [ B{ 1 2 3 } "::" 9000 <inet6> broadcast-once ] unit-test
] when
IN: windows.directx.dinput.constants.tests
USING: tools.test windows.directx.dinput.constants.private ;
-[ ] [ define-constants ] unit-test
-[ ] [ free-dinput-constants ] unit-test
+{ } [ define-constants ] unit-test
+{ } [ free-dinput-constants ] unit-test
[ [ drop ] each-element ] must-infer
SYMBOL: xml-file
-[ ] [
+{ } [
"vocab:xml/tests/test.xml"
[ file>xml ] with-html-entities xml-file set
] unit-test
-[ t ] [
+{ t } [
"vocab:xml/tests/test.xml" binary file-contents
[ bytes>xml ] with-html-entities xml-file get =
] unit-test
-[ "1.0" ] [ xml-file get prolog>> version>> ] unit-test
-[ f ] [ xml-file get prolog>> standalone>> ] unit-test
-[ "a" ] [ xml-file get space>> ] unit-test
-[ "http://www.hello.com" ] [ xml-file get url>> ] unit-test
-[ "that" ] [
+{ "1.0" } [ xml-file get prolog>> version>> ] unit-test
+{ f } [ xml-file get prolog>> standalone>> ] unit-test
+{ "a" } [ xml-file get space>> ] unit-test
+{ "http://www.hello.com" } [ xml-file get url>> ] unit-test
+{ "that" } [
xml-file get T{ name f "" "this" "http://d.de" } attr
] unit-test
-[ t ] [ xml-file get children>> second contained-tag? ] unit-test
+{ t } [ xml-file get children>> second contained-tag? ] unit-test
[ "<a></b>" string>xml ] [ xml-error? ] must-fail-with
-[ T{ comment f "This is where the fun begins!" } ] [
+{ T{ comment f "This is where the fun begins!" } } [
xml-file get before>> [ comment? ] find nip
] unit-test
-[ "xsl stylesheet=\"that-one.xsl\"" ] [
+{ "xsl stylesheet=\"that-one.xsl\"" } [
xml-file get after>> [ instruction? ] find nip text>>
] unit-test
-[ V{ "fa&g" } ] [ xml-file get "x" get-id children>> ] unit-test
-[ "that" ] [ xml-file get "this" attr ] unit-test
-[ "abcd" ] [
+{ V{ "fa&g" } } [ xml-file get "x" get-id children>> ] unit-test
+{ "that" } [ xml-file get "this" attr ] unit-test
+{ "abcd" } [
"<main>a<sub>bc</sub>d<nothing/></main>" string>xml
[ [ dup string? [ % ] [ drop ] if ] deep-each ] "" make
] unit-test
-[ "abcd" ] [
+{ "abcd" } [
"<main>a<sub>bc</sub>d<nothing/></main>" string>xml
[ string? ] deep-filter concat
] unit-test
-[ "foo" ] [
+{ "foo" } [
"<a><b id='c'>foo</b><d id='e'/></a>" string>xml
"c" get-id children>string
] unit-test
-[ "foo" ] [
+{ "foo" } [
"<x y='foo'/>" string>xml
dup dup "y" attr "z" set-attr
T{ name { space "blah" } { main "z" } } attr
] unit-test
[ "<!-- B+, B, or B--->" string>xml ] must-fail
-[ ] [ "<?xml version='1.0'?><!-- declarations for <head> & <body> --><foo/>" string>xml drop ] unit-test
+{ } [ "<?xml version='1.0'?><!-- declarations for <head> & <body> --><foo/>" string>xml drop ] unit-test
: first-thing ( seq -- elt )
"" swap remove first ;
-[ T{ element-decl f "br" "EMPTY" } ] [ "<!ELEMENT br EMPTY>" string>dtd directives>> first-thing ] unit-test
-[ T{ element-decl f "p" "(#PCDATA|emph)*" } ] [ "<!ELEMENT p (#PCDATA|emph)*>" string>dtd directives>> first-thing ] unit-test
-[ T{ element-decl f "%name.para;" "%content.para;" } ] [ "<!ELEMENT %name.para; %content.para;>" string>dtd directives>> first-thing ] unit-test
-[ T{ element-decl f "container" "ANY" } ] [ "<!ELEMENT container ANY>" string>dtd directives>> first-thing ] unit-test
-[ T{ doctype-decl f "foo" } ] [ "<!DOCTYPE foo>" string>xml-chunk first-thing ] unit-test
-[ T{ doctype-decl f "foo" } ] [ "<!DOCTYPE foo >" string>xml-chunk first-thing ] unit-test
-[ T{ doctype-decl f "foo" T{ system-id f "blah.dtd" } } ] [ "<!DOCTYPE foo SYSTEM 'blah.dtd'>" string>xml-chunk first-thing ] unit-test
-[ T{ doctype-decl f "foo" T{ system-id f "blah.dtd" } } ] [ "<!DOCTYPE foo SYSTEM \"blah.dtd\" >" string>xml-chunk first-thing ] unit-test
-[ 958 ] [ [ "ξ" string>xml-chunk ] with-html-entities first first ] unit-test
-[ "x" "<" ] [ "<x value='<'/>" string>xml [ name>> main>> ] [ "value" attr ] bi ] unit-test
-[ "foo" ] [ "<!DOCTYPE foo [<!ENTITY bar 'foo'>]><x>&bar;</x>" string>xml children>string ] unit-test
-[ T{ xml-chunk f V{ "hello" } } ] [ "hello" string>xml-chunk ] unit-test
-[ "1.1" ] [ "<?xml version='1.1'?><x/>" string>xml prolog>> version>> ] unit-test
-[ "ß" ] [ "<x>ß</x>" <string-reader> read-xml children>string ] unit-test
+{ T{ element-decl f "br" "EMPTY" } } [ "<!ELEMENT br EMPTY>" string>dtd directives>> first-thing ] unit-test
+{ T{ element-decl f "p" "(#PCDATA|emph)*" } } [ "<!ELEMENT p (#PCDATA|emph)*>" string>dtd directives>> first-thing ] unit-test
+{ T{ element-decl f "%name.para;" "%content.para;" } } [ "<!ELEMENT %name.para; %content.para;>" string>dtd directives>> first-thing ] unit-test
+{ T{ element-decl f "container" "ANY" } } [ "<!ELEMENT container ANY>" string>dtd directives>> first-thing ] unit-test
+{ T{ doctype-decl f "foo" } } [ "<!DOCTYPE foo>" string>xml-chunk first-thing ] unit-test
+{ T{ doctype-decl f "foo" } } [ "<!DOCTYPE foo >" string>xml-chunk first-thing ] unit-test
+{ T{ doctype-decl f "foo" T{ system-id f "blah.dtd" } } } [ "<!DOCTYPE foo SYSTEM 'blah.dtd'>" string>xml-chunk first-thing ] unit-test
+{ T{ doctype-decl f "foo" T{ system-id f "blah.dtd" } } } [ "<!DOCTYPE foo SYSTEM \"blah.dtd\" >" string>xml-chunk first-thing ] unit-test
+{ 958 } [ [ "ξ" string>xml-chunk ] with-html-entities first first ] unit-test
+{ "x" "<" } [ "<x value='<'/>" string>xml [ name>> main>> ] [ "value" attr ] bi ] unit-test
+{ "foo" } [ "<!DOCTYPE foo [<!ENTITY bar 'foo'>]><x>&bar;</x>" string>xml children>string ] unit-test
+{ T{ xml-chunk f V{ "hello" } } } [ "hello" string>xml-chunk ] unit-test
+{ "1.1" } [ "<?xml version='1.1'?><x/>" string>xml prolog>> version>> ] unit-test
+{ "ß" } [ "<x>ß</x>" <string-reader> read-xml children>string ] unit-test
! <pull-xml> tests
! this tests just checks that pull-event doesn't raise an exception
-[ ] [ "vocab:xml/tests/test.xml" binary [ <pull-xml> pull-event drop ] with-file-reader ] unit-test
+{ } [ "vocab:xml/tests/test.xml" binary [ <pull-xml> pull-event drop ] with-file-reader ] unit-test
: failing-valids ( -- tests )
partition-xml-tests nip [ second first ] map [ type>> "valid" = ] filter ;
-[ ] [ partition-xml-tests 2drop ] unit-test
+{ } [ partition-xml-tests 2drop ] unit-test
multi-methods:GENERIC: first-test ( -- )
-[ t ] [ \ first-test generic? ] unit-test
+{ t } [ \ first-test generic? ] unit-test
MIXIN: thing
: play ( obj1 obj2 -- ? ) beats? ;
[ { } 3 play ] must-fail
-[ t ] [ error get no-method? ] unit-test
-[ ] [ error get error. ] unit-test
-[ { { } 3 } ] [ error get arguments>> ] unit-test
-[ t ] [ paper scissors play ] unit-test
-[ f ] [ scissors paper play ] unit-test
+{ t } [ error get no-method? ] unit-test
+{ } [ error get error. ] unit-test
+{ { { } 3 } } [ error get arguments>> ] unit-test
+{ t } [ paper scissors play ] unit-test
+{ f } [ scissors paper play ] unit-test
-[ t ] [ { beats? paper scissors } method-spec? ] unit-test
-[ ] [ { beats? paper scissors } see ] unit-test
+{ t } [ { beats? paper scissors } method-spec? ] unit-test
+{ } [ { beats? paper scissors } see ] unit-test
SYMBOL: some-var
METHOD: hook-test { hashtable { some-var number } } assoc-size ;
{ 1 2 3 } some-var set
-[ { f t t } ] [ { t t f } hook-test ] unit-test
+{ { f t t } } [ { t t f } hook-test ] unit-test
[ fixnum ] [ 3 hook-test ] unit-test
5.0 some-var set
-[ 0 ] [ H{ } hook-test ] unit-test
+{ 0 } [ H{ } hook-test ] unit-test
"error" some-var set
[ H{ } hook-test ] must-fail
-[ t ] [ error get no-method? ] unit-test
-[ { H{ } "error" } ] [ error get arguments>> ] unit-test
+{ t } [ error get no-method? ] unit-test
+{ { H{ } "error" } } [ error get arguments>> ] unit-test
MIXIN: busted