-
Notifications
You must be signed in to change notification settings - Fork 451
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
add some tests for call #58
Conversation
|
||
(; the following test fails | ||
(assert_eq (invoke "calladd" (invoke "callone") (invoke "calltwo")) | ||
(i32.const 3)) |
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.
The reason this fails is that the first argument to assert_eq
isn't an arbitrary expression, it must be a fixed form (assert_eq (invoke ...) ...)
. This relates to trying to limit how much expression evaluation happens in the scripting language, compared to within real wasm code.
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.
should I create a second module that exports functions called "test{feature}" and then on outer asserts call those?
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.
I don't quite follow what you're suggesting. In general, we try to do most of the computation inside wasm and then just assert the result (or, when #54 merges, printing output and asserting output match with a .log file in expected-output).
Tentatively closing since patch is rather out of date and calls now have a lot more tests. Feel free to reopen. |
This proposes to use the idea suggested by WebAssembly#58 on using `br_on_exn` instead of `if_except`.
…ind_test Remove use of let from func.bind test
Remove fpenv from overview, add proposed spec text on Relaxed operations
the idea is to test call and call_indirect, but since I can't get to call call_indirect without a syntax error I start with simple call tests.
notice that at the bottom there's a commented test that fails.