]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/tools/test/test-tests.factor
core: subseq-index? -> subseq-of?
[factor.git] / basis / tools / test / test-tests.factor
index 473335645f5a25ee4b465b25939d1a8f40eb5d8d..71c80992fa2e5de466dc5992496b65945ce8e357 100644 (file)
@@ -1,4 +1,20 @@
 IN: tools.test.tests
-USING: tools.test ;
+USING: continuations debugger io.streams.string kernel namespaces
+sequences tools.test tools.test.private ;
 
-\ test-all must-infer
+{ 1 } [
+    [
+        [ "OOPS" ] must-fail
+    ] fake-unit-test length
+] unit-test
+
+: create-test-failure ( -- error )
+    [ "hello" throw ] [
+        f "path" 25 error-continuation get test-failure boa
+    ] recover ;
+
+! Just verifies that the presented output contains a callstack.
+{ t } [
+    create-test-failure [ error. ] with-string-writer
+    "OBJ-CURRENT-THREAD" subseq-of?
+] unit-test