From 5a21742f74bed62aea4e0ac6589e05df9ac4d6a0 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Mon, 19 Sep 2011 16:39:30 -0700 Subject: [PATCH] tools.test: move fake-unit-test utility from test suite to module --- basis/tools/test/test-tests.factor | 10 +--------- basis/tools/test/test.factor | 9 +++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/basis/tools/test/test-tests.factor b/basis/tools/test/test-tests.factor index c8ce3e01c7..c6ff98789d 100644 --- a/basis/tools/test/test-tests.factor +++ b/basis/tools/test/test-tests.factor @@ -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 diff --git a/basis/tools/test/test.factor b/basis/tools/test/test.factor index 79399123af..b222630b4b 100644 --- a/basis/tools/test/test.factor +++ b/basis/tools/test/test.factor @@ -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 ; +