compiler.tests.stack-trace: unit tests against the #1265 bugs
parent
d18c48c75b
commit
b6d25ba090
|
@ -1,6 +1,7 @@
|
||||||
USING: compiler tools.test namespaces sequences
|
USING: accessors combinators.short-circuit compiler continuations
|
||||||
kernel.private kernel math continuations continuations.private
|
continuations.private fry generic generic.hook grouping io.backend
|
||||||
words splitting grouping sorting accessors ;
|
io.encodings.utf8 io.files io.files.temp kernel kernel.private math namespaces
|
||||||
|
parser sequences sorting splitting tools.test vocabs words ;
|
||||||
IN: compiler.tests.stack-trace
|
IN: compiler.tests.stack-trace
|
||||||
|
|
||||||
: symbolic-stack-trace ( -- newseq )
|
: symbolic-stack-trace ( -- newseq )
|
||||||
|
@ -30,3 +31,15 @@ IN: compiler.tests.stack-trace
|
||||||
\ + stack-trace-any?
|
\ + stack-trace-any?
|
||||||
\ > stack-trace-any?
|
\ > stack-trace-any?
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
! #1265: Checks that the quotation index never is f (it's -1 instead).
|
||||||
|
{ f } [
|
||||||
|
[ normalize-path ] ignore-errors error-continuation get
|
||||||
|
call>> callstack>array [ f = ] any?
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
! Crashes factor if compiled in debug mode.
|
||||||
|
[ ] [
|
||||||
|
"USING: continuations io.backend ; [ normalize-path ] ignore-errors f"
|
||||||
|
"weird.factor" temp-file [ utf8 set-file-contents ] keep run-file
|
||||||
|
] unit-test
|
||||||
|
|
Loading…
Reference in New Issue