-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Log error message for spectests expecting a failure #672
Conversation
b5b4d39
to
3dd9269
Compare
Codecov Report
@@ Coverage Diff @@
## master #672 +/- ##
=======================================
Coverage 99.29% 99.29%
=======================================
Files 71 71
Lines 9805 9805
=======================================
Hits 9736 9736
Misses 69 69
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -293,15 +293,15 @@ class test_runner | |||
catch (fizzy::parser_error const& ex) | |||
{ | |||
if (type == "assert_malformed") | |||
pass(); | |||
pass(ex.what()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to also include the expected error kind, e.g.
pass(ex.what()); | |
pass("malformed: " + ex.what()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each line already includes the kind of assertion it tests:
Line 29: assert_invalid PASSED invalid index of an exported function
Line 6: assert_malformed PASSED invalid wasm module prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. This is not visible in the added CTest test.
set_tests_properties( | ||
fizzy/smoketests/spectests/showpassed-error-message | ||
PROPERTIES | ||
PASS_REGULAR_EXPRESSION "PASSED invalid wasm module prefix" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PASS_REGULAR_EXPRESSION "PASSED invalid wasm module prefix" | |
PASS_REGULAR_EXPRESSION "assert_invalid PASSED invalid wasm module prefix" |
3dd9269
to
45a0c29
Compare
This can be helpful, when you'd like to check whether the invalid case fails for the right reason.
(It is displayed only with
--show-passed
option)