Closed titzer closed 1 month ago
We have the wast directive assert_suspension
for asserting unhandled tags. Is your point that assert_trap
should handle suspensions too, or do you mean it should gracefully exit (as opposed to throwing an unhandled exception)?
Oh, indeed. Eval.Suspension should be handled in run.ml/input_from like all other.
Is your point that assert_trap should handle suspensions too,
Oh, indeed. Eval.Suspension should be handled in run.ml/input_from like all other.
Yes, if an unhandled suspension is a trap then I think assert_trap
should be able to handle it. I think it's a bit cleaner to avoid introducing a new assertion mechanism (because consumers of .wast
will have to implement it).
It's not a trap, nor is an unhandled exception. They are simply that: unhandled exceptions/suspensions. The former was already reported, the latter wasn't.
Ok, I can accept that. Then I think an assert_suspension
is fine.
This issue has been resolved in #93. Once #84 lands the fix will be available in main
.
Fixed by #84.
When I run the test:
The output is:
I.e. this looks like an Ocaml crash, but it should be a runtime error as the test asserts.