From 9baf67e6f5421c1735b155fff58298ceda35006e Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Tue, 25 Aug 2015 09:19:54 -0500 Subject: [PATCH] Assert a few more tests --- ml-proto/test/expected-output/memory.wasm.log | 1 - ml-proto/test/forward.wasm | 8 ++++---- ml-proto/test/memory.wasm | 7 ++++--- 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 ml-proto/test/expected-output/memory.wasm.log diff --git a/ml-proto/test/expected-output/memory.wasm.log b/ml-proto/test/expected-output/memory.wasm.log deleted file mode 100644 index 4706d157fa..0000000000 --- a/ml-proto/test/expected-output/memory.wasm.log +++ /dev/null @@ -1 +0,0 @@ --3.10552331246e+231 : f64 diff --git a/ml-proto/test/forward.wasm b/ml-proto/test/forward.wasm index 04ae6e676f..de1a72f3c5 100644 --- a/ml-proto/test/forward.wasm +++ b/ml-proto/test/forward.wasm @@ -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)) diff --git a/ml-proto/test/memory.wasm b/ml-proto/test/memory.wasm index fb9a7f5262..2a90129398 100644 --- a/ml-proto/test/memory.wasm +++ b/ml-proto/test/memory.wasm @@ -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) @@ -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))