]> gitweb.factorcode.org Git - factor.git/commitdiff
Test fixes
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 1 Feb 2010 20:41:13 +0000 (09:41 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 3 Feb 2010 10:11:31 +0000 (23:11 +1300)
basis/stack-checker/transforms/transforms-tests.factor
basis/tools/profiler/profiler-tests.factor
core/kernel/kernel-tests.factor

index bbe3cb2ed9a8959072060da2aa886d479846adfe..6ebbc5c0151df15d088b6097bfa48d24dbf0a64d 100644 (file)
@@ -78,7 +78,7 @@ MACRO: curry-folding-test ( quot -- )
 
 \ bad-macro [ "OOPS" throw ] 0 define-transform
 
-[ [ bad-macro ] infer ] [ f >>continuation T{ transform-expansion-error f "OOPS" f bad-macro } = ] must-fail-with
+[ [ bad-macro ] infer ] [ [ transform-expansion-error? ] [ error>> "OOPS" = ] [ word>> \ bad-macro = ] tri and and ] must-fail-with
 
 MACRO: two-params ( a b -- c ) + 1quotation ;
 
index 1a8ff824d6dad422b3acc796b6c9ff2d7aca4602..a85d93450644147577b8242be85d41cc729e54a3 100644 (file)
@@ -58,7 +58,7 @@ IN: tools.profiler.tests
 
 [ ] [ [ [ ] compile-call ] profile ] unit-test
 
-[ [ gensym execute ] profile ] [ T{ undefined } = ] must-fail-with
+[ [ gensym execute ] profile ] [ undefined? ] must-fail-with
 
 : crash-bug-1 ( -- x ) "hi" <uninterned-word> ;
 : crash-bug-2 ( -- ) 100000 [ crash-bug-1 drop ] times ;
index ded2ee970294496376f419b42a1963ab2c716426..ca8aa8286b20e464e9c549b25ccce3ff90fd7028 100644 (file)
@@ -127,38 +127,38 @@ IN: kernel.tests
 
 ! Test traceback accuracy
 : last-frame ( -- pair )
-    error-continuation get call>> callstack>array 4 head* 2 tail* ;
+    error-continuation get call>> callstack>array 6 head* 3 tail* ;
 
 [
-    { [ 1 2 [ 3 throw ] call 4 ] 3 }
+    { [ 1 2 [ 3 throw ] call 4 ] [ 1 2 [ 3 throw ] call 4 ] 3 }
 ] [
     [ [ 1 2 [ 3 throw ] call 4 ] call ] ignore-errors
     last-frame
 ] unit-test
 
 [
-    { [ 1 2 [ 3 throw ] dip 4 ] 3 }
+    { [ 1 2 [ 3 throw ] dip 4 ] [ 1 2 [ 3 throw ] dip 4 ] 3 }
 ] [
     [ [ 1 2 [ 3 throw ] dip 4 ] call ] ignore-errors
     last-frame
 ] unit-test
 
 [
-    { [ 1 2 3 throw [ ] call 4 ] 3 }
+    { [ 1 2 3 throw [ ] call 4 ] [ 1 2 3 throw [ ] call 4 ] 3 }
 ] [
     [ [ 1 2 3 throw [ ] call 4 ] call ] ignore-errors
     last-frame
 ] unit-test
 
 [
-    { [ 1 2 3 throw [ ] dip 4 ] 3 }
+    { [ 1 2 3 throw [ ] dip 4 ] [ 1 2 3 throw [ ] dip 4 ] 3 }
 ] [
     [ [ 1 2 3 throw [ ] dip 4 ] call ] ignore-errors
     last-frame
 ] unit-test
 
 [
-    { [ 1 2 3 throw [ ] [ ] if 4 ] 3 }
+    { [ 1 2 3 throw [ ] [ ] if 4 ] [ 1 2 3 throw [ ] [ ] if 4 ] 3 }
 ] [
     [ [ 1 2 3 throw [ ] [ ] if 4 ] call ] ignore-errors
     last-frame