Skip to content

Commit

Permalink
Merge pull request #24 from WebAssembly/assert-more-tests
Browse files Browse the repository at this point in the history
Add some more asserts
  • Loading branch information
rossberg committed Aug 25, 2015
2 parents 4021931 + 9baf67e commit a3991ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion ml-proto/test/expected-output/memory.wasm.log

This file was deleted.

8 changes: 4 additions & 4 deletions ml-proto/test/forward.wasm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
(global $scratch i32)
)

(invoke "even" (const.i32 13)) ;; 0 : i32
(invoke "even" (const.i32 20)) ;; 1 : i32
(invoke "odd" (const.i32 13)) ;; 1 : i32
(invoke "odd" (const.i32 20)) ;; 0 : i32
(asserteq (invoke "even" (const.i32 13)) (const.i32 0))
(asserteq (invoke "even" (const.i32 20)) (const.i32 1))
(asserteq (invoke "odd" (const.i32 13)) (const.i32 1))
(asserteq (invoke "odd" (const.i32 20)) (const.i32 0))
7 changes: 4 additions & 3 deletions ml-proto/test/memory.wasm
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
(eq.f64 (getnear.f64 (const.i32 8)) (cast.i64.f64 (const.i64 -12345)))
(return (const.f64 0))
)
(setfarunaligneds.i16 (const.i64 3) (const.i32 -23423))
(return (getnear.f64 (const.i32 0)))
(setfarunaligneds.i64 (const.i64 9) (const.i64 0))
(setfarunaligneds.i16 (const.i64 15) (const.i32 16453))
(return (getnearunaligned.f64 (const.i32 9)))
)

(export "data" $data)
Expand All @@ -83,4 +84,4 @@
(asserteq (invoke "data") (const.i32 1))
(asserteq (invoke "aligned") (const.i32 1))
(asserteq (invoke "unaligned") (const.i32 1))
(invoke "cast") ;; -3.10552331246e+231 : f64
(asserteq (invoke "cast") (const.f64 42.0))

0 comments on commit a3991ca

Please sign in to comment.