Skip to content

Commit a3991ca

Browse files
committed
Merge pull request #24 from WebAssembly/assert-more-tests
Add some more asserts
2 parents 4021931 + 9baf67e commit a3991ca

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

ml-proto/test/expected-output/memory.wasm.log

Lines changed: 0 additions & 1 deletion
This file was deleted.

ml-proto/test/forward.wasm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
(global $scratch i32)
2323
)
2424

25-
(invoke "even" (const.i32 13)) ;; 0 : i32
26-
(invoke "even" (const.i32 20)) ;; 1 : i32
27-
(invoke "odd" (const.i32 13)) ;; 1 : i32
28-
(invoke "odd" (const.i32 20)) ;; 0 : i32
25+
(asserteq (invoke "even" (const.i32 13)) (const.i32 0))
26+
(asserteq (invoke "even" (const.i32 20)) (const.i32 1))
27+
(asserteq (invoke "odd" (const.i32 13)) (const.i32 1))
28+
(asserteq (invoke "odd" (const.i32 20)) (const.i32 0))

ml-proto/test/memory.wasm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@
7070
(eq.f64 (getnear.f64 (const.i32 8)) (cast.i64.f64 (const.i64 -12345)))
7171
(return (const.f64 0))
7272
)
73-
(setfarunaligneds.i16 (const.i64 3) (const.i32 -23423))
74-
(return (getnear.f64 (const.i32 0)))
73+
(setfarunaligneds.i64 (const.i64 9) (const.i64 0))
74+
(setfarunaligneds.i16 (const.i64 15) (const.i32 16453))
75+
(return (getnearunaligned.f64 (const.i32 9)))
7576
)
7677

7778
(export "data" $data)
@@ -83,4 +84,4 @@
8384
(asserteq (invoke "data") (const.i32 1))
8485
(asserteq (invoke "aligned") (const.i32 1))
8586
(asserteq (invoke "unaligned") (const.i32 1))
86-
(invoke "cast") ;; -3.10552331246e+231 : f64
87+
(asserteq (invoke "cast") (const.f64 42.0))

0 commit comments

Comments
 (0)