Skip to content

Commit e50edf6

Browse files
committed
Add test for non-ERROR:
1 parent c0d2ffb commit e50edf6

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

test/test-error-handling.expected

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,36 @@
55

66
<ERROR::>Thrown: ERROR:{ division-by-zero { x 1 } }
77

8-
<COMPLETEDIN::>0.234216 ms
8+
<COMPLETEDIN::>0.274156 ms
99

1010
<IT::>Unexpected custom error in user code
1111

1212
<ERROR::>Thrown: ERROR:{ custom-error { error-message "thrown custom error" } {...
1313

14-
<COMPLETEDIN::>0.135980 ms
14+
<COMPLETEDIN::>0.179815 ms
1515

1616
<IT::>Expected custom error
1717

1818
<PASSED::>Test Passed
1919

20-
<COMPLETEDIN::>0.066256 ms
20+
<COMPLETEDIN::>0.059046 ms
2121

2222
<IT::>Missing expected custom error
2323

2424
<FAILED::>Test Failed : Expected :<:LF:>THROWN: ERROR:{ custom-error<:LF:> { error-message "thrown custom error" }<:LF:> { integer-argument 1 }<:LF:>}<:LF:>but got :<:LF:>1
2525

26-
<COMPLETEDIN::>0.167460 ms
26+
<COMPLETEDIN::>0.166183 ms
27+
28+
<IT::>Missing expected thrown error
29+
30+
<FAILED::>Test Failed : Expected :<:LF:>THROWN: "thrown error"<:LF:>but got :<:LF:>"thrown error"
31+
32+
<COMPLETEDIN::>0.028068 ms
2733

2834
<IT::>Missing expected thrown custom error
2935

3036
<FAILED::>Test Failed : Expected :<:LF:>THROWN: ERROR:{ custom-error<:LF:> { error-message "thrown custom error" }<:LF:> { integer-argument 1 }<:LF:>}<:LF:>but got :<:LF:>ERROR:{ custom-error<:LF:> { error-message "thrown custom error" }<:LF:> { integer-argument 1 }<:LF:>}
3137

32-
<COMPLETEDIN::>0.061402 ms
38+
<COMPLETEDIN::>0.056286 ms
3339

34-
<COMPLETEDIN::>0.819462 ms
40+
<COMPLETEDIN::>0.952354 ms

test/test-error-handling.factor

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ C: <custom-error> custom-error
2121
"Missing expected custom error" it#{
2222
<{ 1 -> "thrown custom error" 1 custom-error }>
2323
}#
24+
"Missing expected thrown error" it#{
25+
<{ "thrown error" -> "thrown error" throw }>
26+
}#
2427
"Missing expected thrown custom error" it#{
2528
<{ "thrown custom error" 1 <custom-error> -> "thrown custom error" 1 custom-error }>
2629
}#

0 commit comments

Comments
 (0)