]> gitweb.factorcode.org Git - factor.git/blobdiff - core/kernel/kernel-tests.factor
kernel: move recusrive-hashcode to math and add test
[factor.git] / core / kernel / kernel-tests.factor
index 23f12b419dc11730d0954aba9fdae3208e3b8208..79f4aac263a4ca0882bbd3cfecf5cad0c8cf822e 100644 (file)
@@ -22,10 +22,13 @@ IN: kernel.tests
     }
 } [ 1 2 10 <iota> [ 3array ] 2with map ] unit-test
 
+
 ! Don't leak extra roots if error is thrown
 { } [ 1000 [ [ 3 throw ] ignore-errors ] times ] unit-test
 
-{ } [ 1000 [ [ -1 f <array> ] ignore-errors ] times ] unit-test
+[ -1 f <array> ] must-fail
+{ } [ 10 [ [ -1 f <array> ] ignore-errors ] times ] unit-test
+! { } [ 1000 [ [ -1 f <array> ] ignore-errors ] times ] unit-test ! Travis CI fails
 
 ! Make sure we report the correct error on stack underflow
 [ clear drop ] [
@@ -132,7 +135,7 @@ IN: kernel.tests
 
 ! Regression
 : (loop) ( a b c d -- )
-    [ pick ] dip swap [ pick ] dip swap
+    pickd swap pickd swap
     < [ [ 1 + ] 3dip (loop) ] [ 4drop ] if ; inline recursive
 
 : loop ( obj -- )
@@ -201,3 +204,8 @@ IN: kernel.tests
 
 { 1 2 3 1 2 3 } [ 1 2 3 3dup ] unit-test
 { 1 2 3 4 1 2 3 4 } [ 1 2 3 4 4dup ] unit-test
+
+{ 2 3 4 1 } [ 1 2 3 4 roll ] unit-test
+{ 1 2 3 4 } [ 2 3 4 1 -roll ] unit-test
+
+{ } [ "kernel" reload ] long-unit-test
\ No newline at end of file