Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

marianoguerra
Copy link

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.


(; the following test fails
(assert_eq (invoke "calladd" (invoke "callone") (invoke "calltwo"))
(i32.const 3))
Copy link
Member

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.

Copy link
Author

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?

Copy link
Member

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).

@lukewagner
Copy link
Member

Tentatively closing since patch is rather out of date and calls now have a lot more tests. Feel free to reopen.

@lukewagner lukewagner closed this Oct 14, 2015
littledan pushed a commit to littledan/spec that referenced this pull request Mar 4, 2018
* Add `share` flag to `memtype`

* Rename notshared -> unshared, fix some nits

* Return multiple values from limit
eqrion pushed a commit to eqrion/wasm-spec that referenced this pull request Jul 18, 2019
awendland pushed a commit to awendland/webassembly-spec-abstypes that referenced this pull request Mar 26, 2020
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
This proposes to use the idea suggested by WebAssembly#58 on using `br_on_exn`
instead of `if_except`.
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
…ind_test

Remove use of let from func.bind test
rossberg pushed a commit that referenced this pull request Sep 4, 2024
Remove fpenv from overview, add proposed spec text on Relaxed operations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants