2008-12-05 09:25:26 -05:00
|
|
|
IN: tools.test.tests
|
2015-12-03 06:00:40 -05:00
|
|
|
USING: continuations debugger io.streams.string kernel namespaces
|
|
|
|
sequences tools.test tools.test.private ;
|
2008-12-05 09:25:26 -05:00
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ 1 } [
|
2009-04-19 19:21:25 -04:00
|
|
|
[
|
|
|
|
[ "OOPS" ] must-fail
|
|
|
|
] fake-unit-test length
|
2011-09-19 19:39:30 -04:00
|
|
|
] unit-test
|
2015-12-03 06:00:40 -05:00
|
|
|
|
|
|
|
: 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" swap subseq?
|
|
|
|
] unit-test
|