]> 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 8ce7bf0631e82497870d57880ea34a328f61168e..71c80992fa2e5de466dc5992496b65945ce8e357 100644 (file)
@@ -1,8 +1,20 @@
 IN: tools.test.tests
-USING: tools.test tools.test.private namespaces kernel sequences ;
+USING: continuations debugger io.streams.string kernel namespaces
+sequences tools.test tools.test.private ;
 
 { 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