From e4aa802e2281bba570b36b7c6b4d871751c9ab2c Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Tue, 19 Nov 2019 20:33:08 +0100 Subject: [PATCH] [interpreter] Unify assert_result* assertions --- interpreter/README.md | 12 +- interpreter/exec/float.ml | 2 + interpreter/script/js.ml | 120 +-- interpreter/script/run.ml | 91 +- interpreter/script/script.ml | 13 +- interpreter/text/arrange.ml | 21 +- interpreter/text/lexer.mll | 4 +- interpreter/text/parser.mly | 25 +- test/core/conversions.wast | 16 +- test/core/f32.wast | 1822 +++++++++++++++++----------------- test/core/f64.wast | 1822 +++++++++++++++++----------------- test/core/float_exprs.wast | 126 +-- test/core/float_misc.wast | 2 +- 13 files changed, 2071 insertions(+), 2005 deletions(-) diff --git a/interpreter/README.md b/interpreter/README.md index 67c58da8e0..a69c7849c2 100644 --- a/interpreter/README.md +++ b/interpreter/README.md @@ -324,9 +324,7 @@ action: ( get ? ) ;; get global export assertion: - ( assert_return * ) ;; assert action has expected results - ( assert_return_canonical_nan ) ;; assert action results in NaN in a canonical form - ( assert_return_arithmetic_nan ) ;; assert action results in NaN with 1 in MSB of fraction field + ( assert_return * ) ;; assert action has expected results ( assert_trap ) ;; assert action traps with given failure string ( assert_exhaustion ) ;; assert action exhausts system resources ( assert_malformed ) ;; assert module cannot be decoded with given failure string @@ -334,6 +332,14 @@ assertion: ( assert_unlinkable ) ;; assert module fails to link ( assert_trap ) ;; assert module traps on instantiation +result: + ( .const ) + +numpat: + ;; literal result + nan:canonical ;; NaN in canonical form + nan:arithmetic ;; NaN with 1 in MSB of payload + meta: ( script ?