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

Left-to-right test #119

Merged
merged 2 commits into from
Oct 12, 2015
Merged

Left-to-right test #119

merged 2 commits into from
Oct 12, 2015

Conversation

pjuftring
Copy link
Contributor

This tests, if all arithmetic instructions evaluate their operands from left to right.

At the moment, I try to implement as many tests mentioned in TestingTodo.md as I can. I hope, that's ok :)
Should I make a pull request for each test, or wait until I have a bunch of tests and make a Pull Request for all of them together?

This test is from TestingTodo. It tests, if all arithmetic instructions
evaluate their operands from left to right.
(func $f64_right (result f64) (i32.store8 (i32.const 0) (i32.const 2)) (f64.const 164))


(func $i32_add (result i32) (call $reset)(i32.add (call $i32_left)(call $i32_right))(call $get))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the overall style of the tests in this directory, please put spaces between operands.

@sunfishcode
Copy link
Member

Other than one comment above, lgtm. Implementing tests in TestingTodo.md is great! Submitting test cases either individually or in groups is fine with me.

FYI, I'm also writing some tests -- #113 -- so if there are specific things you're interested in working on, let me know and we can coordinate and avoid duplicating effort.

For consistency with the other tests, I added missing spaces between
operands.
@sunfishcode
Copy link
Member

lgtm; thanks!

sunfishcode added a commit that referenced this pull request Oct 12, 2015
@sunfishcode sunfishcode merged commit 2eed6c4 into WebAssembly:master Oct 12, 2015
@pjuftring pjuftring deleted the left-to-right branch October 12, 2015 18:06
@pjuftring
Copy link
Contributor Author

@sunfishcode You said, I should let you know on which tests I'm working at the moment. So here is a list of tests I'm interested in/working on:
(I'm not sure if this is the right place to post this, should I have opened an "Issue" for that?)

  • test that call and store operands are evaluated left-to-right too
  • test that page_size returns a power of 2
  • test that one can clobber the entire contents of the linear memory without corrupting: call stack, global variables, local variables, program execution.
  • test that converting int32 to float and back isn't folded away
  • test that converting int64 to double and back isn't folded away

@sunfishcode
Copy link
Member

Great! I've now created #132 to serve as a central place for discussing writing tests for the remainder of TestingTodo.md going forward.

eqrion pushed a commit to eqrion/wasm-spec that referenced this pull request Nov 25, 2019
Fix a couple of parser omissions regarding elem & data syntax. Refactor grammar in spec slightly for more clarity. Adjust tests.
Connicpu pushed a commit to Connicpu/wasm-spec that referenced this pull request May 11, 2020
This command is meant to execute each action on a separate thread, then
validate that each returns the expected value.

It's currently unimplemented in both `script/run.ml` and `script/js.ml`.
rossberg pushed a commit that referenced this pull request Feb 11, 2021
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
…ly#119)

This reverts commit e7196b7.

This was also squashed against the guidelines, so this reverts it.
rossberg pushed a commit that referenced this pull request Sep 4, 2024
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