]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing more unit tests
authorSlava Pestov <slava@shill.internal.stack-effects.com>
Fri, 17 Apr 2009 20:50:03 +0000 (15:50 -0500)
committerSlava Pestov <slava@shill.internal.stack-effects.com>
Fri, 17 Apr 2009 20:50:03 +0000 (15:50 -0500)
basis/compiler/tree/normalization/normalization-tests.factor
basis/eval/eval-tests.factor
basis/prettyprint/prettyprint-tests.factor
basis/ui/gadgets/paragraphs/paragraphs-tests.factor
basis/ui/tools/error-list/error-list.factor

index 2097f4ebdde276f8318bef4f040d432d4bd972b6..680ae0b1709f0a28abe2696ad810a8b2afab1bf7 100644 (file)
@@ -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
index 675921944ab75a62552fdcefe9ce0c828da29396..d27e66119346609f0fc9ef1a4d83488c2ed52967 100644 (file)
@@ -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
index afec29ff619b94bc4f48883c0946f684534c908b..428699032b541f3cb5e38c197c988f02245621cc 100644 (file)
@@ -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
index fcc121e584068186b53e5a71364ef20acc23299c..c8494216b40a271c4de452c780eca03f4d7c8338 100644 (file)
@@ -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
 
index 7efe023f9ad75a238f0aa5f6d61e47be598e10be..2b1b0dabcdb741dc6b6c8692b8452b345a740d2b 100644 (file)
@@ -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 ;