tools.test: move fake-unit-test utility from test suite to module
parent
dc36fd712d
commit
5a21742f74
|
@ -1,14 +1,6 @@
|
||||||
IN: tools.test.tests
|
IN: tools.test.tests
|
||||||
USING: tools.test tools.test.private namespaces kernel sequences ;
|
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 ] [
|
[ 1 ] [
|
||||||
[
|
[
|
||||||
[ "OOPS" ] must-fail
|
[ "OOPS" ] must-fail
|
||||||
|
|
|
@ -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>
|
PRIVATE>
|
||||||
|
|
||||||
: run-test-file ( path -- )
|
: run-test-file ( path -- )
|
||||||
|
@ -160,3 +168,4 @@ M: test-failure error. ( error -- )
|
||||||
: test ( prefix -- ) child-vocabs test-vocabs ;
|
: test ( prefix -- ) child-vocabs test-vocabs ;
|
||||||
|
|
||||||
: test-all ( -- ) vocabs filter-don't-test test-vocabs ;
|
: test-all ( -- ) vocabs filter-don't-test test-vocabs ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue