]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.test: move fake-unit-test utility from test suite to module
authorJoe Groff <arcata@gmail.com>
Mon, 19 Sep 2011 23:39:30 +0000 (16:39 -0700)
committerJoe Groff <arcata@gmail.com>
Mon, 10 Oct 2011 19:23:23 +0000 (12:23 -0700)
basis/tools/test/test-tests.factor
basis/tools/test/test.factor

index c8ce3e01c7fe69c72a1211a305503935cbf3d294..c6ff98789da3eb73ef04b87637d21231455f6bbe 100644 (file)
@@ -1,16 +1,8 @@
 IN: tools.test.tests
 USING: tools.test tools.test.private namespaces kernel sequences ;
 
-: fake-unit-test ( quot -- )
-    [
-        "fake" file set
-        V{ } clone test-failures set
-        call
-        test-failures get
-    ] with-scope ; inline
-
 [ 1 ] [
     [
         [ "OOPS" ] must-fail
     ] fake-unit-test length
-] unit-test
\ No newline at end of file
+] unit-test
index 79399123afa79dffec4c4634fa94df1fcdd653a7..b222630b4b28c8b31b2f253ab719a9d3939b1339 100644 (file)
@@ -111,6 +111,14 @@ SYNTAX: TEST:
 
 >>
 
+: fake-unit-test ( quot -- test-failures )
+    [
+        "fake" file set
+        V{ } clone test-failures set
+        call
+        test-failures get
+    ] with-scope ; inline
+
 PRIVATE>
 
 : run-test-file ( path -- )
@@ -160,3 +168,4 @@ M: test-failure error. ( error -- )
 : test ( prefix -- ) child-vocabs test-vocabs ;
 
 : test-all ( -- ) vocabs filter-don't-test test-vocabs ;
+