Test fixes
parent
7846074b3b
commit
0b278adb5a
|
@ -78,7 +78,7 @@ MACRO: curry-folding-test ( quot -- )
|
||||||
|
|
||||||
\ bad-macro [ "OOPS" throw ] 0 define-transform
|
\ bad-macro [ "OOPS" throw ] 0 define-transform
|
||||||
|
|
||||||
[ [ bad-macro ] infer ] [ f >>continuation T{ transform-expansion-error f "OOPS" f bad-macro } = ] must-fail-with
|
[ [ bad-macro ] infer ] [ [ transform-expansion-error? ] [ error>> "OOPS" = ] [ word>> \ bad-macro = ] tri and and ] must-fail-with
|
||||||
|
|
||||||
MACRO: two-params ( a b -- c ) + 1quotation ;
|
MACRO: two-params ( a b -- c ) + 1quotation ;
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ IN: tools.profiler.tests
|
||||||
|
|
||||||
[ ] [ [ [ ] compile-call ] profile ] unit-test
|
[ ] [ [ [ ] compile-call ] profile ] unit-test
|
||||||
|
|
||||||
[ [ gensym execute ] profile ] [ T{ undefined } = ] must-fail-with
|
[ [ gensym execute ] profile ] [ undefined? ] must-fail-with
|
||||||
|
|
||||||
: crash-bug-1 ( -- x ) "hi" <uninterned-word> ;
|
: crash-bug-1 ( -- x ) "hi" <uninterned-word> ;
|
||||||
: crash-bug-2 ( -- ) 100000 [ crash-bug-1 drop ] times ;
|
: crash-bug-2 ( -- ) 100000 [ crash-bug-1 drop ] times ;
|
||||||
|
|
|
@ -127,38 +127,38 @@ IN: kernel.tests
|
||||||
|
|
||||||
! Test traceback accuracy
|
! Test traceback accuracy
|
||||||
: last-frame ( -- pair )
|
: last-frame ( -- pair )
|
||||||
error-continuation get call>> callstack>array 4 head* 2 tail* ;
|
error-continuation get call>> callstack>array 6 head* 3 tail* ;
|
||||||
|
|
||||||
[
|
[
|
||||||
{ [ 1 2 [ 3 throw ] call 4 ] 3 }
|
{ [ 1 2 [ 3 throw ] call 4 ] [ 1 2 [ 3 throw ] call 4 ] 3 }
|
||||||
] [
|
] [
|
||||||
[ [ 1 2 [ 3 throw ] call 4 ] call ] ignore-errors
|
[ [ 1 2 [ 3 throw ] call 4 ] call ] ignore-errors
|
||||||
last-frame
|
last-frame
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
{ [ 1 2 [ 3 throw ] dip 4 ] 3 }
|
{ [ 1 2 [ 3 throw ] dip 4 ] [ 1 2 [ 3 throw ] dip 4 ] 3 }
|
||||||
] [
|
] [
|
||||||
[ [ 1 2 [ 3 throw ] dip 4 ] call ] ignore-errors
|
[ [ 1 2 [ 3 throw ] dip 4 ] call ] ignore-errors
|
||||||
last-frame
|
last-frame
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
{ [ 1 2 3 throw [ ] call 4 ] 3 }
|
{ [ 1 2 3 throw [ ] call 4 ] [ 1 2 3 throw [ ] call 4 ] 3 }
|
||||||
] [
|
] [
|
||||||
[ [ 1 2 3 throw [ ] call 4 ] call ] ignore-errors
|
[ [ 1 2 3 throw [ ] call 4 ] call ] ignore-errors
|
||||||
last-frame
|
last-frame
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
{ [ 1 2 3 throw [ ] dip 4 ] 3 }
|
{ [ 1 2 3 throw [ ] dip 4 ] [ 1 2 3 throw [ ] dip 4 ] 3 }
|
||||||
] [
|
] [
|
||||||
[ [ 1 2 3 throw [ ] dip 4 ] call ] ignore-errors
|
[ [ 1 2 3 throw [ ] dip 4 ] call ] ignore-errors
|
||||||
last-frame
|
last-frame
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
{ [ 1 2 3 throw [ ] [ ] if 4 ] 3 }
|
{ [ 1 2 3 throw [ ] [ ] if 4 ] [ 1 2 3 throw [ ] [ ] if 4 ] 3 }
|
||||||
] [
|
] [
|
||||||
[ [ 1 2 3 throw [ ] [ ] if 4 ] call ] ignore-errors
|
[ [ 1 2 3 throw [ ] [ ] if 4 ] call ] ignore-errors
|
||||||
last-frame
|
last-frame
|
||||||
|
|
Loading…
Reference in New Issue