Fixing more unit tests
parent
cd97d3f590
commit
ce76331fd6
|
@ -17,13 +17,13 @@ sequences accessors tools.test kernel math ;
|
|||
|
||||
[ 2 ] [ [ 3 [ drop ] [ 2drop 3 ] if ] build-tree count-introductions ] unit-test
|
||||
|
||||
: foo ( a b -- b a ) swap ; inline recursive
|
||||
: foo ( quot: ( -- ) -- ) call ; inline recursive
|
||||
|
||||
: recursive-inputs ( nodes -- n )
|
||||
[ #recursive? ] find nip child>> first in-d>> length ;
|
||||
|
||||
[ 0 2 ] [
|
||||
[ foo ] build-tree
|
||||
[ 1 3 ] [
|
||||
[ [ swap ] foo ] build-tree
|
||||
[ recursive-inputs ]
|
||||
[ analyze-recursive normalize recursive-inputs ] bi
|
||||
] unit-test
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
IN: eval.tests
|
||||
USING: eval tools.test ;
|
||||
|
||||
[ 4 ] [ "USE: math 2 2 +" eval( -- result ) ] unit-test
|
||||
[ "USE: math 2 2 +" eval( -- ) ] must-fail
|
||||
[ "4\n" ] [ "USING: math prettyprint ; 2 2 + ." eval>string ] unit-test
|
||||
|
|
|
@ -2,8 +2,8 @@ USING: arrays definitions io.streams.string io.streams.duplex
|
|||
kernel math namespaces parser prettyprint prettyprint.config
|
||||
prettyprint.sections sequences tools.test vectors words
|
||||
effects splitting generic.standard prettyprint.private
|
||||
continuations generic compiler.units tools.walker eval
|
||||
accessors make vocabs.parser see ;
|
||||
continuations generic compiler.units tools.continuations
|
||||
tools.continuations.private eval accessors make vocabs.parser see ;
|
||||
IN: prettyprint.tests
|
||||
|
||||
[ "4" ] [ 4 unparse ] unit-test
|
||||
|
|
|
@ -27,7 +27,7 @@ INSTANCE: fake-break word-break
|
|||
|
||||
[ { 0 0 } ] [ "a" get loc>> ] unit-test
|
||||
|
||||
[ { 45 15 } ] [ "b" get loc>> ] unit-test
|
||||
[ { 45 7 } ] [ "b" get loc>> ] unit-test
|
||||
|
||||
[ { 0 30 } ] [ "c" get loc>> ] unit-test
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ M: error-renderer row-columns
|
|||
{
|
||||
[ error-type error-icon ]
|
||||
[ line#>> [ number>string ] [ "" ] if* ]
|
||||
[ asset>> unparse-short ]
|
||||
[ asset>> [ unparse-short ] [ "" ] if* ]
|
||||
[ error>> summary ]
|
||||
} cleave
|
||||
] output>array ;
|
||||
|
|
Loading…
Reference in New Issue