diff options
-rw-r--r-- | test/spec/mutable-global/globals.txt | 40 | ||||
-rw-r--r-- | test/spec/mutable-global/linking.txt | 41 | ||||
-rw-r--r-- | test/spec/nontrapping-float-to-int-conversions/conversions.txt | 6 | ||||
-rw-r--r-- | test/spec/sign-extension-ops/i32.txt | 6 | ||||
-rw-r--r-- | test/spec/sign-extension-ops/i64.txt | 6 | ||||
-rwxr-xr-x | test/update-spec-tests.py | 17 |
6 files changed, 111 insertions, 5 deletions
diff --git a/test/spec/mutable-global/globals.txt b/test/spec/mutable-global/globals.txt new file mode 100644 index 00000000..04337a1e --- /dev/null +++ b/test/spec/mutable-global/globals.txt @@ -0,0 +1,40 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/proposals/mutable-global/globals.wast +(;; STDOUT ;;; +out/test/spec/mutable-global/globals.wast:50: assert_invalid passed: + error: can't set_global on immutable global at index 0. + 0000026: error: OnSetGlobalExpr callback failed +out/test/spec/mutable-global/globals.wast:59: assert_invalid passed: + 0000013: error: expected END opcode after initializer expression +out/test/spec/mutable-global/globals.wast:64: assert_invalid passed: + 000000e: error: unexpected opcode in initializer expression: 0x20 +out/test/spec/mutable-global/globals.wast:69: assert_invalid passed: + 0000013: error: expected END opcode after initializer expression +out/test/spec/mutable-global/globals.wast:74: assert_invalid passed: + 0000010: error: expected END opcode after initializer expression +out/test/spec/mutable-global/globals.wast:79: assert_invalid passed: + 000000e: error: unexpected opcode in initializer expression: 0x1 +out/test/spec/mutable-global/globals.wast:84: assert_invalid passed: + error: type mismatch in global, expected i32 but got f32. + 0000013: error: EndGlobalInitExpr callback failed +out/test/spec/mutable-global/globals.wast:89: assert_invalid passed: + 0000010: error: expected END opcode after initializer expression +out/test/spec/mutable-global/globals.wast:94: assert_invalid passed: + error: type mismatch in global, expected i32 but got void. + 000000e: error: EndGlobalInitExpr callback failed +out/test/spec/mutable-global/globals.wast:99: assert_invalid passed: + error: initializer expression can only reference an imported global + 000000f: error: OnInitExprGetGlobalExpr callback failed +out/test/spec/mutable-global/globals.wast:104: assert_invalid passed: + error: initializer expression can only reference an imported global + 000000f: error: OnInitExprGetGlobalExpr callback failed +out/test/spec/mutable-global/globals.wast:112: assert_malformed passed: + 0000019: error: unable to read string: import field name +out/test/spec/mutable-global/globals.wast:125: assert_malformed passed: + 0000019: error: unable to read string: import field name +out/test/spec/mutable-global/globals.wast:142: assert_malformed passed: + 0000011: error: global mutability must be 0 or 1 +out/test/spec/mutable-global/globals.wast:154: assert_malformed passed: + 0000011: error: global mutability must be 0 or 1 +31/31 tests passed. +;;; STDOUT ;;) diff --git a/test/spec/mutable-global/linking.txt b/test/spec/mutable-global/linking.txt new file mode 100644 index 00000000..567143d1 --- /dev/null +++ b/test/spec/mutable-global/linking.txt @@ -0,0 +1,41 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/proposals/mutable-global/linking.wast +(;; STDOUT ;;; +out/test/spec/mutable-global/linking.wast:28: assert_unlinkable passed: + error: import signature mismatch + 0000025: error: OnImportFunc callback failed +out/test/spec/mutable-global/linking.wast:32: assert_unlinkable passed: + error: import signature mismatch + 0000026: error: OnImportFunc callback failed +out/test/spec/mutable-global/linking.wast:87: assert_unlinkable passed: + error: mutability mismatch in imported global, expected mutable but got immutable. + 000001a: error: OnImportGlobal callback failed +out/test/spec/mutable-global/linking.wast:91: assert_unlinkable passed: + error: mutability mismatch in imported global, expected immutable but got mutable. + 0000016: error: OnImportGlobal callback failed +out/test/spec/mutable-global/linking.wast:207: assert_unlinkable passed: + error: elem segment is out of bounds: [10, 11) >= max value 10 + 0000028: error: OnElemSegmentFunctionIndexCount callback failed +out/test/spec/mutable-global/linking.wast:216: assert_unlinkable passed: + error: unknown module field "mem" + 0000027: error: OnImportMemory callback failed +out/test/spec/mutable-global/linking.wast:228: assert_unlinkable passed: + error: elem segment is out of bounds: [12, 13) >= max value 10 + 000002f: error: OnElemSegmentFunctionIndexCount callback failed +out/test/spec/mutable-global/linking.wast:239: assert_unlinkable passed: + error: data segment is out of bounds: [65536, 65537) >= max value 65536 + 0000042: error: OnDataSegmentData callback failed +out/test/spec/mutable-global/linking.wast:299: assert_unlinkable passed: + error: data segment is out of bounds: [65536, 65537) >= max value 65536 + 0000020: error: OnDataSegmentData callback failed +out/test/spec/mutable-global/linking.wast:324: assert_unlinkable passed: + error: unknown module field "tab" + 0000037: error: OnImportTable callback failed +out/test/spec/mutable-global/linking.wast:335: assert_unlinkable passed: + error: data segment is out of bounds: [327680, 327681) >= max value 327680 + 0000028: error: OnDataSegmentData callback failed +out/test/spec/mutable-global/linking.wast:345: assert_unlinkable passed: + error: elem segment is out of bounds: [0, 1) >= max value 0 + 000002d: error: OnElemSegmentFunctionIndexCount callback failed +91/91 tests passed. +;;; STDOUT ;;) diff --git a/test/spec/nontrapping-float-to-int-conversions/conversions.txt b/test/spec/nontrapping-float-to-int-conversions/conversions.txt new file mode 100644 index 00000000..392b1bc0 --- /dev/null +++ b/test/spec/nontrapping-float-to-int-conversions/conversions.txt @@ -0,0 +1,6 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/proposals/nontrapping-float-to-int-conversions/conversions.wast +;;; ARGS*: --enable-saturating-float-to-int +(;; STDOUT ;;; +581/581 tests passed. +;;; STDOUT ;;) diff --git a/test/spec/sign-extension-ops/i32.txt b/test/spec/sign-extension-ops/i32.txt new file mode 100644 index 00000000..f21e780b --- /dev/null +++ b/test/spec/sign-extension-ops/i32.txt @@ -0,0 +1,6 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/proposals/sign-extension-ops/i32.wast +;;; ARGS*: --enable-sign-extension +(;; STDOUT ;;; +373/373 tests passed. +;;; STDOUT ;;) diff --git a/test/spec/sign-extension-ops/i64.txt b/test/spec/sign-extension-ops/i64.txt new file mode 100644 index 00000000..a1199587 --- /dev/null +++ b/test/spec/sign-extension-ops/i64.txt @@ -0,0 +1,6 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/proposals/sign-extension-ops/i64.wast +;;; ARGS*: --enable-sign-extension +(;; STDOUT ;;; +383/383 tests passed. +;;; STDOUT ;;) diff --git a/test/update-spec-tests.py b/test/update-spec-tests.py index 78da34a9..bac7688a 100755 --- a/test/update-spec-tests.py +++ b/test/update-spec-tests.py @@ -68,6 +68,13 @@ def ProcessDir(wabt_test_dir, testsuite_dir, tool, flags=None): f.write(';;; ARGS*: %s\n' % flags) +def ProcessProposalDir(name, flags=None): + ProcessDir(os.path.join(SPEC_TEST_DIR, name), + os.path.join(TESTSUITE_DIR, 'proposals', name), + 'run-interp-spec', + flags) + + def ProcessTestsuite(wabt_test_dir, testsuite_dir, tool, flags=None): testsuite_dir = os.path.join(TESTSUITE_DIR, reldir) testsuite_tests = GetFilesWithExtension(testsuite_dir, '.wast') @@ -85,11 +92,11 @@ def main(args): ProcessDir(SPEC_TEST_DIR, TESTSUITE_DIR, 'run-interp-spec') ProcessDir(WASM2C_SPEC_TEST_DIR, TESTSUITE_DIR, 'run-spec-wasm2c') - ProcessDir( - os.path.join(SPEC_TEST_DIR, 'multi-value'), - os.path.join(TESTSUITE_DIR, 'proposals', 'multi-value'), - 'run-interp-spec', - '--enable-multi-value') + ProcessProposalDir('multi-value', '--enable-multi-value') + ProcessProposalDir('mutable-global') # Already enabled by default. + ProcessProposalDir('nontrapping-float-to-int-conversions', + '--enable-saturating-float-to-int') + ProcessProposalDir('sign-extension-ops', '--enable-sign-extension') return 0 |