From c80ca4509f69d3f4933b500545fba0c118ce2312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Sun, 13 Oct 2024 10:05:14 -0700 Subject: [PATCH] add memory_init tests --- tests/gen.py | 7 +- tests/gen/assert_memory_init.0.c | 163 +++++ tests/gen/assert_memory_init.1.c | 163 +++++ tests/gen/assert_memory_init.11.c | 13 + tests/gen/assert_memory_init.12.c | 11 + tests/gen/assert_memory_init.13.c | 11 + tests/gen/assert_memory_init.14.c | 11 + tests/gen/assert_memory_init.15.c | 11 + tests/gen/assert_memory_init.16.c | 13 + tests/gen/assert_memory_init.17.c | 11 + tests/gen/assert_memory_init.18.c | 13 + tests/gen/assert_memory_init.19.c | 13 + tests/gen/assert_memory_init.2.c | 163 +++++ tests/gen/assert_memory_init.20.c | 11 + tests/gen/assert_memory_init.3.c | 163 +++++ tests/gen/assert_memory_init.6.c | 13 + tests/gen/assert_memory_init.7.c | 11 + tests/gen/assert_memory_init.8.c | 11 + tests/gen/assert_memory_init.84.c | 16 + tests/gen/assert_memory_init.85.c | 16 + tests/gen/assert_memory_init.86.c | 16 + tests/gen/assert_memory_init.87.c | 16 + tests/gen/assert_memory_init.88.c | 16 + tests/gen/assert_memory_init.89.c | 16 + tests/gen/assert_memory_init.90.c | 11 + tests/gen/memory_init.0.wasm | Bin 0 -> 110 bytes tests/gen/memory_init.1.wasm | Bin 0 -> 122 bytes tests/gen/memory_init.10.wasm | Bin 0 -> 59 bytes tests/gen/memory_init.11.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.12.wasm | Bin 0 -> 59 bytes tests/gen/memory_init.13.wasm | Bin 0 -> 59 bytes tests/gen/memory_init.14.wasm | Bin 0 -> 60 bytes tests/gen/memory_init.15.wasm | Bin 0 -> 59 bytes tests/gen/memory_init.16.wasm | Bin 0 -> 59 bytes tests/gen/memory_init.17.wasm | Bin 0 -> 60 bytes tests/gen/memory_init.18.wasm | Bin 0 -> 60 bytes tests/gen/memory_init.19.wasm | Bin 0 -> 60 bytes tests/gen/memory_init.2.wasm | Bin 0 -> 122 bytes tests/gen/memory_init.20.wasm | Bin 0 -> 60 bytes tests/gen/memory_init.21.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.22.wasm | Bin 0 -> 58 bytes tests/gen/memory_init.23.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.24.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.25.wasm | Bin 0 -> 64 bytes tests/gen/memory_init.26.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.27.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.28.wasm | Bin 0 -> 58 bytes tests/gen/memory_init.29.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.3.wasm | Bin 0 -> 188 bytes tests/gen/memory_init.30.wasm | Bin 0 -> 58 bytes tests/gen/memory_init.31.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.32.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.33.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.34.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.35.wasm | Bin 0 -> 72 bytes tests/gen/memory_init.36.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.37.wasm | Bin 0 -> 64 bytes tests/gen/memory_init.38.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.39.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.4.wasm | Bin 0 -> 37 bytes tests/gen/memory_init.40.wasm | Bin 0 -> 64 bytes tests/gen/memory_init.41.wasm | Bin 0 -> 67 bytes tests/gen/memory_init.42.wasm | Bin 0 -> 64 bytes tests/gen/memory_init.43.wasm | Bin 0 -> 71 bytes tests/gen/memory_init.44.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.45.wasm | Bin 0 -> 64 bytes tests/gen/memory_init.46.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.47.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.48.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.49.wasm | Bin 0 -> 71 bytes tests/gen/memory_init.5.wasm | Bin 0 -> 51 bytes tests/gen/memory_init.50.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.51.wasm | Bin 0 -> 75 bytes tests/gen/memory_init.52.wasm | Bin 0 -> 58 bytes tests/gen/memory_init.53.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.54.wasm | Bin 0 -> 58 bytes tests/gen/memory_init.55.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.56.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.57.wasm | Bin 0 -> 64 bytes tests/gen/memory_init.58.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.59.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.6.wasm | Bin 0 -> 54 bytes tests/gen/memory_init.60.wasm | Bin 0 -> 58 bytes tests/gen/memory_init.61.wasm | Bin 0 -> 61 bytes tests/gen/memory_init.62.wasm | Bin 0 -> 58 bytes tests/gen/memory_init.63.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.64.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.65.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.66.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.67.wasm | Bin 0 -> 72 bytes tests/gen/memory_init.68.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.69.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.7.wasm | Bin 0 -> 62 bytes tests/gen/memory_init.70.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.71.wasm | Bin 0 -> 72 bytes tests/gen/memory_init.72.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.73.wasm | Bin 0 -> 71 bytes tests/gen/memory_init.74.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.75.wasm | Bin 0 -> 75 bytes tests/gen/memory_init.76.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.77.wasm | Bin 0 -> 68 bytes tests/gen/memory_init.78.wasm | Bin 0 -> 65 bytes tests/gen/memory_init.79.wasm | Bin 0 -> 72 bytes tests/gen/memory_init.8.wasm | Bin 0 -> 62 bytes tests/gen/memory_init.80.wasm | Bin 0 -> 72 bytes tests/gen/memory_init.81.wasm | Bin 0 -> 75 bytes tests/gen/memory_init.82.wasm | Bin 0 -> 72 bytes tests/gen/memory_init.83.wasm | Bin 0 -> 79 bytes tests/gen/memory_init.84.wasm | Bin 0 -> 136 bytes tests/gen/memory_init.85.wasm | Bin 0 -> 136 bytes tests/gen/memory_init.86.wasm | Bin 0 -> 136 bytes tests/gen/memory_init.87.wasm | Bin 0 -> 136 bytes tests/gen/memory_init.88.wasm | Bin 0 -> 135 bytes tests/gen/memory_init.89.wasm | Bin 0 -> 135 bytes tests/gen/memory_init.9.wasm | Bin 0 -> 45 bytes tests/gen/memory_init.90.wasm | Bin 0 -> 176 bytes tests/gen/memory_init.json | 242 ++++++++ tests/memory_init.wast | 967 ++++++++++++++++++++++++++++++ 118 files changed, 2127 insertions(+), 1 deletion(-) create mode 100644 tests/gen/assert_memory_init.0.c create mode 100644 tests/gen/assert_memory_init.1.c create mode 100644 tests/gen/assert_memory_init.11.c create mode 100644 tests/gen/assert_memory_init.12.c create mode 100644 tests/gen/assert_memory_init.13.c create mode 100644 tests/gen/assert_memory_init.14.c create mode 100644 tests/gen/assert_memory_init.15.c create mode 100644 tests/gen/assert_memory_init.16.c create mode 100644 tests/gen/assert_memory_init.17.c create mode 100644 tests/gen/assert_memory_init.18.c create mode 100644 tests/gen/assert_memory_init.19.c create mode 100644 tests/gen/assert_memory_init.2.c create mode 100644 tests/gen/assert_memory_init.20.c create mode 100644 tests/gen/assert_memory_init.3.c create mode 100644 tests/gen/assert_memory_init.6.c create mode 100644 tests/gen/assert_memory_init.7.c create mode 100644 tests/gen/assert_memory_init.8.c create mode 100644 tests/gen/assert_memory_init.84.c create mode 100644 tests/gen/assert_memory_init.85.c create mode 100644 tests/gen/assert_memory_init.86.c create mode 100644 tests/gen/assert_memory_init.87.c create mode 100644 tests/gen/assert_memory_init.88.c create mode 100644 tests/gen/assert_memory_init.89.c create mode 100644 tests/gen/assert_memory_init.90.c create mode 100644 tests/gen/memory_init.0.wasm create mode 100644 tests/gen/memory_init.1.wasm create mode 100644 tests/gen/memory_init.10.wasm create mode 100644 tests/gen/memory_init.11.wasm create mode 100644 tests/gen/memory_init.12.wasm create mode 100644 tests/gen/memory_init.13.wasm create mode 100644 tests/gen/memory_init.14.wasm create mode 100644 tests/gen/memory_init.15.wasm create mode 100644 tests/gen/memory_init.16.wasm create mode 100644 tests/gen/memory_init.17.wasm create mode 100644 tests/gen/memory_init.18.wasm create mode 100644 tests/gen/memory_init.19.wasm create mode 100644 tests/gen/memory_init.2.wasm create mode 100644 tests/gen/memory_init.20.wasm create mode 100644 tests/gen/memory_init.21.wasm create mode 100644 tests/gen/memory_init.22.wasm create mode 100644 tests/gen/memory_init.23.wasm create mode 100644 tests/gen/memory_init.24.wasm create mode 100644 tests/gen/memory_init.25.wasm create mode 100644 tests/gen/memory_init.26.wasm create mode 100644 tests/gen/memory_init.27.wasm create mode 100644 tests/gen/memory_init.28.wasm create mode 100644 tests/gen/memory_init.29.wasm create mode 100644 tests/gen/memory_init.3.wasm create mode 100644 tests/gen/memory_init.30.wasm create mode 100644 tests/gen/memory_init.31.wasm create mode 100644 tests/gen/memory_init.32.wasm create mode 100644 tests/gen/memory_init.33.wasm create mode 100644 tests/gen/memory_init.34.wasm create mode 100644 tests/gen/memory_init.35.wasm create mode 100644 tests/gen/memory_init.36.wasm create mode 100644 tests/gen/memory_init.37.wasm create mode 100644 tests/gen/memory_init.38.wasm create mode 100644 tests/gen/memory_init.39.wasm create mode 100644 tests/gen/memory_init.4.wasm create mode 100644 tests/gen/memory_init.40.wasm create mode 100644 tests/gen/memory_init.41.wasm create mode 100644 tests/gen/memory_init.42.wasm create mode 100644 tests/gen/memory_init.43.wasm create mode 100644 tests/gen/memory_init.44.wasm create mode 100644 tests/gen/memory_init.45.wasm create mode 100644 tests/gen/memory_init.46.wasm create mode 100644 tests/gen/memory_init.47.wasm create mode 100644 tests/gen/memory_init.48.wasm create mode 100644 tests/gen/memory_init.49.wasm create mode 100644 tests/gen/memory_init.5.wasm create mode 100644 tests/gen/memory_init.50.wasm create mode 100644 tests/gen/memory_init.51.wasm create mode 100644 tests/gen/memory_init.52.wasm create mode 100644 tests/gen/memory_init.53.wasm create mode 100644 tests/gen/memory_init.54.wasm create mode 100644 tests/gen/memory_init.55.wasm create mode 100644 tests/gen/memory_init.56.wasm create mode 100644 tests/gen/memory_init.57.wasm create mode 100644 tests/gen/memory_init.58.wasm create mode 100644 tests/gen/memory_init.59.wasm create mode 100644 tests/gen/memory_init.6.wasm create mode 100644 tests/gen/memory_init.60.wasm create mode 100644 tests/gen/memory_init.61.wasm create mode 100644 tests/gen/memory_init.62.wasm create mode 100644 tests/gen/memory_init.63.wasm create mode 100644 tests/gen/memory_init.64.wasm create mode 100644 tests/gen/memory_init.65.wasm create mode 100644 tests/gen/memory_init.66.wasm create mode 100644 tests/gen/memory_init.67.wasm create mode 100644 tests/gen/memory_init.68.wasm create mode 100644 tests/gen/memory_init.69.wasm create mode 100644 tests/gen/memory_init.7.wasm create mode 100644 tests/gen/memory_init.70.wasm create mode 100644 tests/gen/memory_init.71.wasm create mode 100644 tests/gen/memory_init.72.wasm create mode 100644 tests/gen/memory_init.73.wasm create mode 100644 tests/gen/memory_init.74.wasm create mode 100644 tests/gen/memory_init.75.wasm create mode 100644 tests/gen/memory_init.76.wasm create mode 100644 tests/gen/memory_init.77.wasm create mode 100644 tests/gen/memory_init.78.wasm create mode 100644 tests/gen/memory_init.79.wasm create mode 100644 tests/gen/memory_init.8.wasm create mode 100644 tests/gen/memory_init.80.wasm create mode 100644 tests/gen/memory_init.81.wasm create mode 100644 tests/gen/memory_init.82.wasm create mode 100644 tests/gen/memory_init.83.wasm create mode 100644 tests/gen/memory_init.84.wasm create mode 100644 tests/gen/memory_init.85.wasm create mode 100644 tests/gen/memory_init.86.wasm create mode 100644 tests/gen/memory_init.87.wasm create mode 100644 tests/gen/memory_init.88.wasm create mode 100644 tests/gen/memory_init.89.wasm create mode 100644 tests/gen/memory_init.9.wasm create mode 100644 tests/gen/memory_init.90.wasm create mode 100644 tests/gen/memory_init.json create mode 100644 tests/memory_init.wast diff --git a/tests/gen.py b/tests/gen.py index f66052b..b71b80f 100644 --- a/tests/gen.py +++ b/tests/gen.py @@ -195,7 +195,12 @@ def gen(paths): wast2json_version = subprocess.check_output(['wast2json', '--version']).decode('utf-8').strip() has_new_wabt = compare_versions(wast2json_version, "1.0.25") > 0 - memory_files = {'memory_copy.wast', 'memory_fill.wast', 'bulk.wast'} + memory_files = { + 'memory_copy.wast', + 'memory_fill.wast', + 'memory_init.wast', + 'bulk.wast' + } for wast_path in paths: print(wast_path) diff --git a/tests/gen/assert_memory_init.0.c b/tests/gen/assert_memory_init.0.c new file mode 100644 index 0000000..48251dc --- /dev/null +++ b/tests/gen/assert_memory_init.0.c @@ -0,0 +1,163 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.0.h" + +void test() { + memoryinit0Instance instance; + memoryinit0Instantiate(&instance, resolveTestImports); + printStart("memory_init.0.wasm"); + memoryinit0_test(&instance); + printOK("test()"); + assertEqualU32( + memoryinit0_load8_u(&instance, 0u), + 0u, + "load8_u(0u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 1u), + 0u, + "load8_u(1u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 2u), + 3u, + "load8_u(2u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 3u), + 1u, + "load8_u(3u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 4u), + 4u, + "load8_u(4u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 5u), + 1u, + "load8_u(5u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 6u), + 0u, + "load8_u(6u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 7u), + 0u, + "load8_u(7u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 8u), + 0u, + "load8_u(8u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 9u), + 0u, + "load8_u(9u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 10u), + 0u, + "load8_u(10u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 11u), + 0u, + "load8_u(11u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 12u), + 7u, + "load8_u(12u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 13u), + 5u, + "load8_u(13u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 14u), + 2u, + "load8_u(14u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 15u), + 3u, + "load8_u(15u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 16u), + 6u, + "load8_u(16u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 17u), + 0u, + "load8_u(17u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 18u), + 0u, + "load8_u(18u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 19u), + 0u, + "load8_u(19u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 20u), + 0u, + "load8_u(20u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 21u), + 0u, + "load8_u(21u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 22u), + 0u, + "load8_u(22u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 23u), + 0u, + "load8_u(23u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 24u), + 0u, + "load8_u(24u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 25u), + 0u, + "load8_u(25u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 26u), + 0u, + "load8_u(26u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 27u), + 0u, + "load8_u(27u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 28u), + 0u, + "load8_u(28u)" + ); + assertEqualU32( + memoryinit0_load8_u(&instance, 29u), + 0u, + "load8_u(29u)" + ); +} diff --git a/tests/gen/assert_memory_init.1.c b/tests/gen/assert_memory_init.1.c new file mode 100644 index 0000000..87827d3 --- /dev/null +++ b/tests/gen/assert_memory_init.1.c @@ -0,0 +1,163 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.1.h" + +void test() { + memoryinit1Instance instance; + memoryinit1Instantiate(&instance, resolveTestImports); + printStart("memory_init.1.wasm"); + memoryinit1_test(&instance); + printOK("test()"); + assertEqualU32( + memoryinit1_load8_u(&instance, 0u), + 0u, + "load8_u(0u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 1u), + 0u, + "load8_u(1u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 2u), + 3u, + "load8_u(2u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 3u), + 1u, + "load8_u(3u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 4u), + 4u, + "load8_u(4u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 5u), + 1u, + "load8_u(5u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 6u), + 0u, + "load8_u(6u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 7u), + 2u, + "load8_u(7u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 8u), + 7u, + "load8_u(8u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 9u), + 1u, + "load8_u(9u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 10u), + 8u, + "load8_u(10u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 11u), + 0u, + "load8_u(11u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 12u), + 7u, + "load8_u(12u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 13u), + 5u, + "load8_u(13u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 14u), + 2u, + "load8_u(14u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 15u), + 3u, + "load8_u(15u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 16u), + 6u, + "load8_u(16u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 17u), + 0u, + "load8_u(17u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 18u), + 0u, + "load8_u(18u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 19u), + 0u, + "load8_u(19u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 20u), + 0u, + "load8_u(20u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 21u), + 0u, + "load8_u(21u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 22u), + 0u, + "load8_u(22u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 23u), + 0u, + "load8_u(23u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 24u), + 0u, + "load8_u(24u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 25u), + 0u, + "load8_u(25u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 26u), + 0u, + "load8_u(26u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 27u), + 0u, + "load8_u(27u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 28u), + 0u, + "load8_u(28u)" + ); + assertEqualU32( + memoryinit1_load8_u(&instance, 29u), + 0u, + "load8_u(29u)" + ); +} diff --git a/tests/gen/assert_memory_init.11.c b/tests/gen/assert_memory_init.11.c new file mode 100644 index 0000000..a0e2e81 --- /dev/null +++ b/tests/gen/assert_memory_init.11.c @@ -0,0 +1,13 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.11.h" + +void test() { + memoryinit11Instance instance; + memoryinit11Instantiate(&instance, resolveTestImports); + printStart("memory_init.11.wasm"); + memoryinit11_test(&instance); + printOK("test()"); +} diff --git a/tests/gen/assert_memory_init.12.c b/tests/gen/assert_memory_init.12.c new file mode 100644 index 0000000..a7a6106 --- /dev/null +++ b/tests/gen/assert_memory_init.12.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.12.h" + +void test() { + memoryinit12Instance instance; + memoryinit12Instantiate(&instance, resolveTestImports); + printStart("memory_init.12.wasm"); +} diff --git a/tests/gen/assert_memory_init.13.c b/tests/gen/assert_memory_init.13.c new file mode 100644 index 0000000..819d32a --- /dev/null +++ b/tests/gen/assert_memory_init.13.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.13.h" + +void test() { + memoryinit13Instance instance; + memoryinit13Instantiate(&instance, resolveTestImports); + printStart("memory_init.13.wasm"); +} diff --git a/tests/gen/assert_memory_init.14.c b/tests/gen/assert_memory_init.14.c new file mode 100644 index 0000000..5ba0d5c --- /dev/null +++ b/tests/gen/assert_memory_init.14.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.14.h" + +void test() { + memoryinit14Instance instance; + memoryinit14Instantiate(&instance, resolveTestImports); + printStart("memory_init.14.wasm"); +} diff --git a/tests/gen/assert_memory_init.15.c b/tests/gen/assert_memory_init.15.c new file mode 100644 index 0000000..526ab3b --- /dev/null +++ b/tests/gen/assert_memory_init.15.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.15.h" + +void test() { + memoryinit15Instance instance; + memoryinit15Instantiate(&instance, resolveTestImports); + printStart("memory_init.15.wasm"); +} diff --git a/tests/gen/assert_memory_init.16.c b/tests/gen/assert_memory_init.16.c new file mode 100644 index 0000000..4c2d6b8 --- /dev/null +++ b/tests/gen/assert_memory_init.16.c @@ -0,0 +1,13 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.16.h" + +void test() { + memoryinit16Instance instance; + memoryinit16Instantiate(&instance, resolveTestImports); + printStart("memory_init.16.wasm"); + memoryinit16_test(&instance); + printOK("test()"); +} diff --git a/tests/gen/assert_memory_init.17.c b/tests/gen/assert_memory_init.17.c new file mode 100644 index 0000000..64b8d8c --- /dev/null +++ b/tests/gen/assert_memory_init.17.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.17.h" + +void test() { + memoryinit17Instance instance; + memoryinit17Instantiate(&instance, resolveTestImports); + printStart("memory_init.17.wasm"); +} diff --git a/tests/gen/assert_memory_init.18.c b/tests/gen/assert_memory_init.18.c new file mode 100644 index 0000000..f42d4ee --- /dev/null +++ b/tests/gen/assert_memory_init.18.c @@ -0,0 +1,13 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.18.h" + +void test() { + memoryinit18Instance instance; + memoryinit18Instantiate(&instance, resolveTestImports); + printStart("memory_init.18.wasm"); + memoryinit18_test(&instance); + printOK("test()"); +} diff --git a/tests/gen/assert_memory_init.19.c b/tests/gen/assert_memory_init.19.c new file mode 100644 index 0000000..00d9185 --- /dev/null +++ b/tests/gen/assert_memory_init.19.c @@ -0,0 +1,13 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.19.h" + +void test() { + memoryinit19Instance instance; + memoryinit19Instantiate(&instance, resolveTestImports); + printStart("memory_init.19.wasm"); + memoryinit19_test(&instance); + printOK("test()"); +} diff --git a/tests/gen/assert_memory_init.2.c b/tests/gen/assert_memory_init.2.c new file mode 100644 index 0000000..21c5190 --- /dev/null +++ b/tests/gen/assert_memory_init.2.c @@ -0,0 +1,163 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.2.h" + +void test() { + memoryinit2Instance instance; + memoryinit2Instantiate(&instance, resolveTestImports); + printStart("memory_init.2.wasm"); + memoryinit2_test(&instance); + printOK("test()"); + assertEqualU32( + memoryinit2_load8_u(&instance, 0u), + 0u, + "load8_u(0u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 1u), + 0u, + "load8_u(1u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 2u), + 3u, + "load8_u(2u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 3u), + 1u, + "load8_u(3u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 4u), + 4u, + "load8_u(4u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 5u), + 1u, + "load8_u(5u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 6u), + 0u, + "load8_u(6u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 7u), + 0u, + "load8_u(7u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 8u), + 0u, + "load8_u(8u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 9u), + 0u, + "load8_u(9u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 10u), + 0u, + "load8_u(10u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 11u), + 0u, + "load8_u(11u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 12u), + 7u, + "load8_u(12u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 13u), + 5u, + "load8_u(13u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 14u), + 2u, + "load8_u(14u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 15u), + 9u, + "load8_u(15u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 16u), + 2u, + "load8_u(16u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 17u), + 7u, + "load8_u(17u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 18u), + 0u, + "load8_u(18u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 19u), + 0u, + "load8_u(19u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 20u), + 0u, + "load8_u(20u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 21u), + 0u, + "load8_u(21u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 22u), + 0u, + "load8_u(22u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 23u), + 0u, + "load8_u(23u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 24u), + 0u, + "load8_u(24u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 25u), + 0u, + "load8_u(25u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 26u), + 0u, + "load8_u(26u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 27u), + 0u, + "load8_u(27u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 28u), + 0u, + "load8_u(28u)" + ); + assertEqualU32( + memoryinit2_load8_u(&instance, 29u), + 0u, + "load8_u(29u)" + ); +} diff --git a/tests/gen/assert_memory_init.20.c b/tests/gen/assert_memory_init.20.c new file mode 100644 index 0000000..c31e211 --- /dev/null +++ b/tests/gen/assert_memory_init.20.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.20.h" + +void test() { + memoryinit20Instance instance; + memoryinit20Instantiate(&instance, resolveTestImports); + printStart("memory_init.20.wasm"); +} diff --git a/tests/gen/assert_memory_init.3.c b/tests/gen/assert_memory_init.3.c new file mode 100644 index 0000000..25f5ddc --- /dev/null +++ b/tests/gen/assert_memory_init.3.c @@ -0,0 +1,163 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.3.h" + +void test() { + memoryinit3Instance instance; + memoryinit3Instantiate(&instance, resolveTestImports); + printStart("memory_init.3.wasm"); + memoryinit3_test(&instance); + printOK("test()"); + assertEqualU32( + memoryinit3_load8_u(&instance, 0u), + 0u, + "load8_u(0u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 1u), + 0u, + "load8_u(1u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 2u), + 3u, + "load8_u(2u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 3u), + 1u, + "load8_u(3u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 4u), + 4u, + "load8_u(4u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 5u), + 1u, + "load8_u(5u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 6u), + 0u, + "load8_u(6u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 7u), + 2u, + "load8_u(7u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 8u), + 7u, + "load8_u(8u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 9u), + 1u, + "load8_u(9u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 10u), + 8u, + "load8_u(10u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 11u), + 0u, + "load8_u(11u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 12u), + 7u, + "load8_u(12u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 13u), + 0u, + "load8_u(13u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 14u), + 7u, + "load8_u(14u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 15u), + 5u, + "load8_u(15u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 16u), + 2u, + "load8_u(16u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 17u), + 7u, + "load8_u(17u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 18u), + 0u, + "load8_u(18u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 19u), + 9u, + "load8_u(19u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 20u), + 0u, + "load8_u(20u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 21u), + 7u, + "load8_u(21u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 22u), + 0u, + "load8_u(22u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 23u), + 8u, + "load8_u(23u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 24u), + 8u, + "load8_u(24u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 25u), + 0u, + "load8_u(25u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 26u), + 0u, + "load8_u(26u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 27u), + 0u, + "load8_u(27u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 28u), + 0u, + "load8_u(28u)" + ); + assertEqualU32( + memoryinit3_load8_u(&instance, 29u), + 0u, + "load8_u(29u)" + ); +} diff --git a/tests/gen/assert_memory_init.6.c b/tests/gen/assert_memory_init.6.c new file mode 100644 index 0000000..b34e0e3 --- /dev/null +++ b/tests/gen/assert_memory_init.6.c @@ -0,0 +1,13 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.6.h" + +void test() { + memoryinit6Instance instance; + memoryinit6Instantiate(&instance, resolveTestImports); + printStart("memory_init.6.wasm"); + memoryinit6_test(&instance); + printOK("test()"); +} diff --git a/tests/gen/assert_memory_init.7.c b/tests/gen/assert_memory_init.7.c new file mode 100644 index 0000000..73c2618 --- /dev/null +++ b/tests/gen/assert_memory_init.7.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.7.h" + +void test() { + memoryinit7Instance instance; + memoryinit7Instantiate(&instance, resolveTestImports); + printStart("memory_init.7.wasm"); +} diff --git a/tests/gen/assert_memory_init.8.c b/tests/gen/assert_memory_init.8.c new file mode 100644 index 0000000..c431acb --- /dev/null +++ b/tests/gen/assert_memory_init.8.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.8.h" + +void test() { + memoryinit8Instance instance; + memoryinit8Instantiate(&instance, resolveTestImports); + printStart("memory_init.8.wasm"); +} diff --git a/tests/gen/assert_memory_init.84.c b/tests/gen/assert_memory_init.84.c new file mode 100644 index 0000000..350bb25 --- /dev/null +++ b/tests/gen/assert_memory_init.84.c @@ -0,0 +1,16 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.84.h" + +void test() { + memoryinit84Instance instance; + memoryinit84Instantiate(&instance, resolveTestImports); + printStart("memory_init.84.wasm"); + assertEqualU32( + memoryinit84_checkRange(&instance, 0u, 1u, 0u), + 4294967295u, + "checkRange(0u, 1u, 0u)" + ); +} diff --git a/tests/gen/assert_memory_init.85.c b/tests/gen/assert_memory_init.85.c new file mode 100644 index 0000000..da18808 --- /dev/null +++ b/tests/gen/assert_memory_init.85.c @@ -0,0 +1,16 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.85.h" + +void test() { + memoryinit85Instance instance; + memoryinit85Instantiate(&instance, resolveTestImports); + printStart("memory_init.85.wasm"); + assertEqualU32( + memoryinit85_checkRange(&instance, 0u, 1u, 0u), + 4294967295u, + "checkRange(0u, 1u, 0u)" + ); +} diff --git a/tests/gen/assert_memory_init.86.c b/tests/gen/assert_memory_init.86.c new file mode 100644 index 0000000..2c583d3 --- /dev/null +++ b/tests/gen/assert_memory_init.86.c @@ -0,0 +1,16 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.86.h" + +void test() { + memoryinit86Instance instance; + memoryinit86Instantiate(&instance, resolveTestImports); + printStart("memory_init.86.wasm"); + assertEqualU32( + memoryinit86_checkRange(&instance, 0u, 1u, 0u), + 4294967295u, + "checkRange(0u, 1u, 0u)" + ); +} diff --git a/tests/gen/assert_memory_init.87.c b/tests/gen/assert_memory_init.87.c new file mode 100644 index 0000000..25896d8 --- /dev/null +++ b/tests/gen/assert_memory_init.87.c @@ -0,0 +1,16 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.87.h" + +void test() { + memoryinit87Instance instance; + memoryinit87Instantiate(&instance, resolveTestImports); + printStart("memory_init.87.wasm"); + assertEqualU32( + memoryinit87_checkRange(&instance, 0u, 1u, 0u), + 4294967295u, + "checkRange(0u, 1u, 0u)" + ); +} diff --git a/tests/gen/assert_memory_init.88.c b/tests/gen/assert_memory_init.88.c new file mode 100644 index 0000000..0acbbe2 --- /dev/null +++ b/tests/gen/assert_memory_init.88.c @@ -0,0 +1,16 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.88.h" + +void test() { + memoryinit88Instance instance; + memoryinit88Instantiate(&instance, resolveTestImports); + printStart("memory_init.88.wasm"); + assertEqualU32( + memoryinit88_checkRange(&instance, 0u, 1u, 0u), + 4294967295u, + "checkRange(0u, 1u, 0u)" + ); +} diff --git a/tests/gen/assert_memory_init.89.c b/tests/gen/assert_memory_init.89.c new file mode 100644 index 0000000..4df709d --- /dev/null +++ b/tests/gen/assert_memory_init.89.c @@ -0,0 +1,16 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.89.h" + +void test() { + memoryinit89Instance instance; + memoryinit89Instantiate(&instance, resolveTestImports); + printStart("memory_init.89.wasm"); + assertEqualU32( + memoryinit89_checkRange(&instance, 0u, 1u, 0u), + 4294967295u, + "checkRange(0u, 1u, 0u)" + ); +} diff --git a/tests/gen/assert_memory_init.90.c b/tests/gen/assert_memory_init.90.c new file mode 100644 index 0000000..340b501 --- /dev/null +++ b/tests/gen/assert_memory_init.90.c @@ -0,0 +1,11 @@ + +#include +#include "w2c2_base.h" +#include "test.h" +#include "test_memory_init.90.h" + +void test() { + memoryinit90Instance instance; + memoryinit90Instantiate(&instance, resolveTestImports); + printStart("memory_init.90.wasm"); +} diff --git a/tests/gen/memory_init.0.wasm b/tests/gen/memory_init.0.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a72bf6108bdf6241d9da75e375f1f9e9793c9a2c GIT binary patch literal 110 zcmWN|I}Uy&0o{0t yyGEJI^4*^T+varx;-__pn<$up77rk^GxUt`h Jp;;&1`~fjA4oUz3 literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.10.wasm b/tests/gen/memory_init.10.wasm new file mode 100644 index 0000000000000000000000000000000000000000..5287d0b5d9e70236db2b2b23cf8b9b226d40e337 GIT binary patch literal 59 zcmV~$F%m#96hOiEBt{71IO=~B3Z*JJsq-l8a#*p&xl*m4 KC-Yk=q3$pKa0j{o literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.12.wasm b/tests/gen/memory_init.12.wasm new file mode 100644 index 0000000000000000000000000000000000000000..26397b3db18e2ea90f4cb59ea59f127aac113d3d GIT binary patch literal 59 zcmV~$u@QhE006OnffGf~aje+{3rj1Q)OjpSxcVbtv_Y681#!;CarXh6u7^AIT`Dzw J8A^%j`2)b-2E70P literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.13.wasm b/tests/gen/memory_init.13.wasm new file mode 100644 index 0000000000000000000000000000000000000000..d046a8d4c445f6b298db54a582a97283d9539170 GIT binary patch literal 59 zcmV~$u@QhE006Onz!OE!aje+{3rj1Q)OjpSxcVbtvOx?oMRCriarXh6u7^AIU23TD J%TP*E&mX|z2E70P literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.14.wasm b/tests/gen/memory_init.14.wasm new file mode 100644 index 0000000000000000000000000000000000000000..51d80802ad860e633658a9468f0429ce5a61a195 GIT binary patch literal 60 zcmV~$K@LDL6hOiE{E9|J+{U^$VPR?29$zrS*=_-o2gD#_h*LK8t94j(-dw5g7u6b1 IhEkHc|Ji&8;{X5v literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.15.wasm b/tests/gen/memory_init.15.wasm new file mode 100644 index 0000000000000000000000000000000000000000..ccef7041003619c63d21498b71834e5d7587eb09 GIT binary patch literal 59 zcmV~$F%m#96hOiEJJ+au J8A=KD_yNG$2D|_O literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.16.wasm b/tests/gen/memory_init.16.wasm new file mode 100644 index 0000000000000000000000000000000000000000..ab456e0297f8c3704b4ade9c6ef6f5988d819c75 GIT binary patch literal 59 zcmV~$F%m#96hOiEBt{71IO=~B3Z*JJsq-l8axc~qF literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.17.wasm b/tests/gen/memory_init.17.wasm new file mode 100644 index 0000000000000000000000000000000000000000..95585f37752e7a0a748f2fda40143a826b0acb5d GIT binary patch literal 60 zcmV~$F%m#96hOiE~gkS!0>=H$e6?_8~th>7M(X&>ia~c K@?|I`)cps@AqM0C literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.18.wasm b/tests/gen/memory_init.18.wasm new file mode 100644 index 0000000000000000000000000000000000000000..d27974d47dfdb2a61e63fe1bd616a1e42904de0d GIT binary patch literal 60 zcmV~$u?>JA6hOiE`J$(+O`8~te=HeC;Q>KIX} Kd>Kj!_51JA6hOiE`J$(+O`8~te=HeC;Q>KIY2 Kd>Kj!_51h9b$7`(qMpQF8Kd K(T47wMDqtTHV#w( literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.20.wasm b/tests/gen/memory_init.20.wasm new file mode 100644 index 0000000000000000000000000000000000000000..3b5e9d26b14bb0eb29c6f4e4cc50721e73bcb339 GIT binary patch literal 60 zcmV~$F%m#96hOiE~gkS!0>=H$e6?_8~th>7M(X&>ia~E K%9o*(Q1>6mSqA6; literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.21.wasm b/tests/gen/memory_init.21.wasm new file mode 100644 index 0000000000000000000000000000000000000000..9d671463bfe501e0e96cc00eb03f6a170dec29ca GIT binary patch literal 61 zcmV~$u?>JA006;%!AQi!IE|$tETV;_6%63u7T$5SN5JR_VURJ1Q!@6uby#%XTqzbS LyvLUy=cw*K#lQxn literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.22.wasm b/tests/gen/memory_init.22.wasm new file mode 100644 index 0000000000000000000000000000000000000000..c3ce5b7146ce8a8aad91e2cd6d746004ae1ae479 GIT binary patch literal 58 zcmV~$F%Ezr5CFklIU^C`cdYRxSXf%Y^DUg=9JA006;%!AQi!IE|$tETV;_6%63u7T$5SN5JR_VURJ1Q!@6uby#%XTq#y~ LkK&gg=cw*K#(D;% literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.25.wasm b/tests/gen/memory_init.25.wasm new file mode 100644 index 0000000000000000000000000000000000000000..dcf889e779a3cb580c5bacef34f9e8498a3c83e7 GIT binary patch literal 64 zcmW;6F%Cd506@|IwW3jzxQkI57hy1(+5IjZXq#)k%_ literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.27.wasm b/tests/gen/memory_init.27.wasm new file mode 100644 index 0000000000000000000000000000000000000000..bec609adf5c69b8238c728ccf9492dca530acd54 GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3IK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! Ry1}#T!_2^-89D+$ z1=m1L6HOuv@{W>pC)%}L|N5L6Zfu7U&}ZK~F84R6B3It{3R8o*m=j__wlp${xg;aD zPS(c~u#N4FX4+c$r-g;I`=zVYoO?lWzzGQ9=wKY2PTL+Y>+0IlelDK+2wVUF literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.36.wasm b/tests/gen/memory_init.36.wasm new file mode 100644 index 0000000000000000000000000000000000000000..2ebb242c8e473fb5dacd2918988c4f931f3c4b00 GIT binary patch literal 61 zcmV~$u?>JA006;%!AQi!IE|$tETV;_6%63u7T$5SN5JR_VURJ1Q!@6uby#%XT&eIL L#p0JB=cw*K$210{ literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.37.wasm b/tests/gen/memory_init.37.wasm new file mode 100644 index 0000000000000000000000000000000000000000..5302466338ffc97fd64d841cf74051e97fd43b05 GIT binary patch literal 64 zcmW;7F%Cd506@|IwW3jzxQkI57hy1(+59ZVPN25XJlpg!^yx6094lmssI20 literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.40.wasm b/tests/gen/memory_init.40.wasm new file mode 100644 index 0000000000000000000000000000000000000000..468ef9ec9b1cefa297ed22f1d42e1c70e3983d1f GIT binary patch literal 64 zcmW;6F%Cd506@|IwW3jzxQkI57hy1(+5j`Ps@|dX~3?7=t>09h(TL literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.44.wasm b/tests/gen/memory_init.44.wasm new file mode 100644 index 0000000000000000000000000000000000000000..6ebd63205485eb89c08751505ba58983072c9bdd GIT binary patch literal 61 zcmV~$F%Cd506@|IwW3jpIE_)tMHq~x_5coU@E%uv1dN^#I_ZNrBxAd4gGtB5nFHQ! LxA-NJA006;%!AQi!IE|$VETV;_6%63u7T$5SN5JR_VURJ1Q!@6uby#%XT&eIL L#p0JB=cw*K$4~~Q literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.47.wasm b/tests/gen/memory_init.47.wasm new file mode 100644 index 0000000000000000000000000000000000000000..87e9f4e9043cbc91f9c3395756071e4513fd3ad9 GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3BK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! R!LzLH@~ literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.5.wasm b/tests/gen/memory_init.5.wasm new file mode 100644 index 0000000000000000000000000000000000000000..2fb1cbcd2278a2e2bd4ef1437a981b48cf5f1132 GIT binary patch literal 51 zcmV~$u@QhE5CFkDc?J;su^kNzji7u2c6rAyVE8~fBqy;{V}4`8rDrj-TJ#?3y#a=| B1rGoK literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.50.wasm b/tests/gen/memory_init.50.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a642fd7be86b29c213f744e789b1cd9636c1e7cc GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3BK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! R!L#gT7Von9br54v=O6vr2jl<% literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.51.wasm b/tests/gen/memory_init.51.wasm new file mode 100644 index 0000000000000000000000000000000000000000..3dbc71e1c15cafeacda973004110b5d76ada3c7a GIT binary patch literal 75 zcmZQbEY4+QU|?WmVN76PU}j=uU}a`xU}WcDWGP84E@5EcVPxczXOv}dW?*QrcLAyd Tf)5DB9}WfvZf+JvMn-c0Jp2hF literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.52.wasm b/tests/gen/memory_init.52.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a40632da421fa2c55323bfe6d0fc5c1bc9df3352 GIT binary patch literal 58 zcmWNTL+Y>+0IlelDK+JA006;%!AQi!IE|$VETV;_6%63u7T$5SN5JR_VURJ1Q!@6uby#%XTq#y~ LkK&gg=cw*K#+wGF literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.59.wasm b/tests/gen/memory_init.59.wasm new file mode 100644 index 0000000000000000000000000000000000000000..912558bce6f06fee0c3f3372778d9b16815b2213 GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3BK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! Ry1}#T5X_GyPM>a<511>Ga%sl_KhI%ib CMFtiC literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.60.wasm b/tests/gen/memory_init.60.wasm new file mode 100644 index 0000000000000000000000000000000000000000..6cfa4f7e43680cf5a86031027a999a4b7bd0ddf9 GIT binary patch literal 58 zcmV~$F%Ezr5CFklIU^C`cdX?lSXf%Y^DUg=9JA006;%!AQi!IE|$VETV;_6%63u7T$5SN5JR_VURJ1Q!@6uby#%XTqzbS LyvLUy=cw*K#pVX4 literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.62.wasm b/tests/gen/memory_init.62.wasm new file mode 100644 index 0000000000000000000000000000000000000000..f8f2203c2f7ff76825251f9830db4e81367d43c3 GIT binary patch literal 58 zcmWl{F%Ezr5CFklIU@n$ckF$M7M4`-d<$b{xJMT-ydW*ICUMKge8z;PWw&wqdo$D; G>hS@tOa^C literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.65.wasm b/tests/gen/memory_init.65.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a07bcc7fb7d4e4102ce419997c3ac4cb1efabc3c GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3BK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! Rx|deG%LdQ#br54v=O6mV2jl<% literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.66.wasm b/tests/gen/memory_init.66.wasm new file mode 100644 index 0000000000000000000000000000000000000000..88bdb2c3282d0c6828b626efdf3dde895e79114c GIT binary patch literal 65 zcmWN{F%Cd506@|IwW3j*IEzuzI0%E$)E?Xc47~Yq)?2{n0ilyVh(j{At2UT)T%0NH OfBQXK@lB9(RM!vRNe3SQ literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.67.wasm b/tests/gen/memory_init.67.wasm new file mode 100644 index 0000000000000000000000000000000000000000..f8e1a8f7effe0a6860f7342fec6c9bdf40b80e5c GIT binary patch literal 72 zcmZQbEY4+QU|?WmVN76PU}j=uU}a`xU}WcDWGP84E@5EcVPxczVU%KUVsrs21A-6s RaK;}F1_o|!7Dh%!a{w6L2weaG literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.68.wasm b/tests/gen/memory_init.68.wasm new file mode 100644 index 0000000000000000000000000000000000000000..d4aa510a3aa90b620c4f0080d864de7a6239a5fc GIT binary patch literal 65 zcmWN{F%Cd506@|IwW3j*IEzu5I0%E$)E?Xc47~Yq)?2{n0ilyVh(j{At2UT)T%6he O^n12q@lB9(RM!vRxCb2o literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.69.wasm b/tests/gen/memory_init.69.wasm new file mode 100644 index 0000000000000000000000000000000000000000..12368506e44dc950e6ea13ae30b10664eec4fac7 GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3IK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! RmsGsV>ITp9br54v=O6n(2jc($ literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.7.wasm b/tests/gen/memory_init.7.wasm new file mode 100644 index 0000000000000000000000000000000000000000..3c1d05f7d4b6f2d4580b34b44513f061ccc2b996 GIT binary patch literal 62 zcmV~$u@QhE006On!4t&7a~W$k(ZbRSCUqVP6Ylm37`-4&G6!)<#{RSpo34jDBU8Uz Lt&RkxMD_du;qnK? literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.70.wasm b/tests/gen/memory_init.70.wasm new file mode 100644 index 0000000000000000000000000000000000000000..ade47939686cdec6f346deedf1228704d2c67a0a GIT binary patch literal 65 zcmWN{F%Cd506@|IwW3j*IEzt;gD@CP?ZF+uz?&auxdn_K5E^NN*d=4VN`*oD$&vj} Ozh_z9d=umx)%gS8#Rnb$ literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.71.wasm b/tests/gen/memory_init.71.wasm new file mode 100644 index 0000000000000000000000000000000000000000..3c5e92650bff2126be418313f2e108063a1388d4 GIT binary patch literal 72 zcmZQbEY4+QU|?WmVN76PU}j=uU}a`xU}WcDWGP84E@5EcVPxczVU%KU0V)E55B83X RaONKl1_o|!7Dh%!a{w7r2wVUF literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.72.wasm b/tests/gen/memory_init.72.wasm new file mode 100644 index 0000000000000000000000000000000000000000..234d72239604fb9682057c97227dc3d1894c717d GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3IK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! RmsGsV2G6qkbr54v=O6p}2jc($ literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.73.wasm b/tests/gen/memory_init.73.wasm new file mode 100644 index 0000000000000000000000000000000000000000..b155c303c9daa94bd236839e5b685f724fa19f8c GIT binary patch literal 71 zcmZQbEY4+QU|?WmVN76PU}j=uU}a`xU}WcDWGP84E@5EcVPxczW|U-b0V)E55BAOs T3=I(C4+jGSH#Z9-BcnM08TAOM literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.74.wasm b/tests/gen/memory_init.74.wasm new file mode 100644 index 0000000000000000000000000000000000000000..8fc73e1f6a0e1788255f02bb7c85e018b4d6f91e GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3BK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! RmsGsV2G6qkbr54v=O6qB2jl<% literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.75.wasm b/tests/gen/memory_init.75.wasm new file mode 100644 index 0000000000000000000000000000000000000000..264cd318bb3955c4235c2ed734db424605ec81e6 GIT binary patch literal 75 zcmZQbEY4+QU|?WmVN76PU}j=uU}a`xU}WcDWGP84E@5EcVPxczXOv}d0V)E55BAOs U3=Q^h-X9JI25xQ^Mn*<+06QrOA^-pY literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.76.wasm b/tests/gen/memory_init.76.wasm new file mode 100644 index 0000000000000000000000000000000000000000..0fac0522d336e502388ae399dd857f9eb2d8ff00 GIT binary patch literal 65 zcmWN{F%Cd506@|IwW3j*IEzt;gD@CP?ZF+uz?&auxdn_K5E^NN*d=4VN`*oD$&vj} Ozh~K8eG}vy)%gS8#|It& literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.77.wasm b/tests/gen/memory_init.77.wasm new file mode 100644 index 0000000000000000000000000000000000000000..99f98b117b61beabfe5f9aaee25b8075d819b743 GIT binary patch literal 68 zcmWN{u@OKp06@|IiQ`1=Y@&3BK`4}}WB?-@Kq0Swoaq)YctBlAQ;Th9$XCiRXg@i! RmsGsV>ITp9br54v=O6o02jl<% literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.78.wasm b/tests/gen/memory_init.78.wasm new file mode 100644 index 0000000000000000000000000000000000000000..6cdb1c0bc1440364e7b968d7ace15005c313bc6c GIT binary patch literal 65 zcmWN{F%Cd506@|IwW3j*IEzuzI0%E$)E?Xc47~Yq)?2{n0ilyVh(j{At2UT)T%6he O^n12q@lB9(RM!vR)CV5` literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.79.wasm b/tests/gen/memory_init.79.wasm new file mode 100644 index 0000000000000000000000000000000000000000..68a36d90ef7bd84a676a9081d9835d4414b4b828 GIT binary patch literal 72 zcmZQbEY4+QU|?WmVN76PU}j=uU}a`xU}WcDWGP84E@5EcVPxczVU%KU0V)E55B5%s RaONKl1_o|!7Dh%!a{w7>2weaG literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.8.wasm b/tests/gen/memory_init.8.wasm new file mode 100644 index 0000000000000000000000000000000000000000..e19033dd791ff455cd132e8e19b9d0e6b43cd887 GIT binary patch literal 62 zcmV~$F%m#96hOiEBqkw@;Y+zF^Q#`pQ}Hx=)AcS?-Yh# Kh1QA$&HV?}x(5gV literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.80.wasm b/tests/gen/memory_init.80.wasm new file mode 100644 index 0000000000000000000000000000000000000000..1afbfb5dec6816538eea0543318bef0f374d20c7 GIT binary patch literal 72 zcmZQbEY4+QU|?WmVN76PU}j=uU}a`xU}WcDWGP84E@5EcVPxczVU%KU0V)E55B6|| RBjXjQw0V)E55B8Xh PKO77U+}tdTjEv?0T#gBw literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.84.wasm b/tests/gen/memory_init.84.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a3cd4ff2df8625fa605176aeea31c3b54ad179c9 GIT binary patch literal 136 zcmZ9CF%E)I5Cz}c#c0@XFwq07l@+ZuSa<+W03k%8kwRm=7q{ToPB)W5|9KGrx6)}u zFgl5Vs(`D4ne{=+VH$_$t)K5BpzrStCbB%s3EDWE*P>~oGDi)#WOKB99Fb@_R+f-M N{(c+4Y)|eke=Ny66(axu literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.85.wasm b/tests/gen/memory_init.85.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a3cd4ff2df8625fa605176aeea31c3b54ad179c9 GIT binary patch literal 136 zcmZ9CF%E)I5Cz}c#c0@XFwq07l@+ZuSa<+W03k%8kwRm=7q{ToPB)W5|9KGrx6)}u zFgl5Vs(`D4ne{=+VH$_$t)K5BpzrStCbB%s3EDWE*P>~oGDi)#WOKB99Fb@_R+f-M N{(c+4Y)|eke=Ny66(axu literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.86.wasm b/tests/gen/memory_init.86.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a3cd4ff2df8625fa605176aeea31c3b54ad179c9 GIT binary patch literal 136 zcmZ9CF%E)I5Cz}c#c0@XFwq07l@+ZuSa<+W03k%8kwRm=7q{ToPB)W5|9KGrx6)}u zFgl5Vs(`D4ne{=+VH$_$t)K5BpzrStCbB%s3EDWE*P>~oGDi)#WOKB99Fb@_R+f-M N{(c+4Y)|eke=Ny66(axu literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.87.wasm b/tests/gen/memory_init.87.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a3cd4ff2df8625fa605176aeea31c3b54ad179c9 GIT binary patch literal 136 zcmZ9CF%E)I5Cz}c#c0@XFwq07l@+ZuSa<+W03k%8kwRm=7q{ToPB)W5|9KGrx6)}u zFgl5Vs(`D4ne{=+VH$_$t)K5BpzrStCbB%s3EDWE*P>~oGDi)#WOKB99Fb@_R+f-M N{(c+4Y)|eke=Ny66(axu literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.88.wasm b/tests/gen/memory_init.88.wasm new file mode 100644 index 0000000000000000000000000000000000000000..8071fef6286a0709f8e73f6fc971d6532f3573ae GIT binary patch literal 135 zcmZ9CF%E)I5Cz}c)o9pnFp&eSm6a_uSa<+W03k#pkwRm=7q{ToPB)W5|9KGrchYG@ zFgl5Vs(@=HxT&NV9^)|G`uRQr`u@&fB8ys1(8l4su9`MVbDRN}Y>t-CBN8pg(h_pW N-){?;9mxIVj|IZo6(9fr literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.89.wasm b/tests/gen/memory_init.89.wasm new file mode 100644 index 0000000000000000000000000000000000000000..8071fef6286a0709f8e73f6fc971d6532f3573ae GIT binary patch literal 135 zcmZ9CF%E)I5Cz}c)o9pnFp&eSm6a_uSa<+W03k#pkwRm=7q{ToPB)W5|9KGrchYG@ zFgl5Vs(@=HxT&NV9^)|G`uRQr`u@&fB8ys1(8l4su9`MVbDRN}Y>t-CBN8pg(h_pW N-){?;9mxIVj|IZo6(9fr literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.9.wasm b/tests/gen/memory_init.9.wasm new file mode 100644 index 0000000000000000000000000000000000000000..aebc7715c6864cc8b30a44a7e89a7648ab584f59 GIT binary patch literal 45 zcmZQbEY4+QU|?WmVN76PU}j=uVCP_DDM>9ZVPN3mXXIsYyu|6q=*akogOPz70E8t5 AS^xk5 literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.90.wasm b/tests/gen/memory_init.90.wasm new file mode 100644 index 0000000000000000000000000000000000000000..31e43458fd471dbe8dea343d3142c2632f93b6d0 GIT binary patch literal 176 zcmZQbEY4+QU|?WmVN76PU}j=uU}a`xVB}$RV)KO7DW+}zEKjzF0Kh5!j| B1y29~ literal 0 HcmV?d00001 diff --git a/tests/gen/memory_init.json b/tests/gen/memory_init.json new file mode 100644 index 0000000..d31cd94 --- /dev/null +++ b/tests/gen/memory_init.json @@ -0,0 +1,242 @@ +{"source_filename": "memory_init.wast", + "commands": [ + {"type": "module", "line": 6, "filename": "memory_init.0.wasm"}, + {"type": "action", "line": 17, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "assert_return", "line": 19, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 20, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 21, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "3"}]}, + {"type": "assert_return", "line": 22, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 23, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "i32", "value": "4"}]}, + {"type": "assert_return", "line": 24, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "5"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 25, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "6"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 26, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "7"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 27, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "8"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 28, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "9"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 29, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "10"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 30, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "11"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 31, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 32, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "13"}]}, "expected": [{"type": "i32", "value": "5"}]}, + {"type": "assert_return", "line": 33, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "14"}]}, "expected": [{"type": "i32", "value": "2"}]}, + {"type": "assert_return", "line": 34, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "15"}]}, "expected": [{"type": "i32", "value": "3"}]}, + {"type": "assert_return", "line": 35, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "16"}]}, "expected": [{"type": "i32", "value": "6"}]}, + {"type": "assert_return", "line": 36, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "17"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 37, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "18"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 38, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "19"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 39, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "20"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 40, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "21"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 41, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "22"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 42, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "23"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 43, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "24"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 44, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "25"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 45, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "26"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 46, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "27"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 47, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "28"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 48, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "29"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "module", "line": 50, "filename": "memory_init.1.wasm"}, + {"type": "action", "line": 61, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "assert_return", "line": 63, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 64, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 65, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "3"}]}, + {"type": "assert_return", "line": 66, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 67, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "i32", "value": "4"}]}, + {"type": "assert_return", "line": 68, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "5"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 69, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "6"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 70, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "7"}]}, "expected": [{"type": "i32", "value": "2"}]}, + {"type": "assert_return", "line": 71, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "8"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 72, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "9"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 73, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "10"}]}, "expected": [{"type": "i32", "value": "8"}]}, + {"type": "assert_return", "line": 74, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "11"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 75, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 76, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "13"}]}, "expected": [{"type": "i32", "value": "5"}]}, + {"type": "assert_return", "line": 77, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "14"}]}, "expected": [{"type": "i32", "value": "2"}]}, + {"type": "assert_return", "line": 78, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "15"}]}, "expected": [{"type": "i32", "value": "3"}]}, + {"type": "assert_return", "line": 79, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "16"}]}, "expected": [{"type": "i32", "value": "6"}]}, + {"type": "assert_return", "line": 80, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "17"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 81, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "18"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 82, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "19"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 83, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "20"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 84, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "21"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 85, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "22"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 86, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "23"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 87, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "24"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 88, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "25"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 89, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "26"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 90, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "27"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 91, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "28"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 92, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "29"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "module", "line": 94, "filename": "memory_init.2.wasm"}, + {"type": "action", "line": 105, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "assert_return", "line": 107, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 108, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 109, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "3"}]}, + {"type": "assert_return", "line": 110, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 111, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "i32", "value": "4"}]}, + {"type": "assert_return", "line": 112, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "5"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 113, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "6"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 114, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "7"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 115, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "8"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 116, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "9"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 117, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "10"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 118, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "11"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 119, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 120, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "13"}]}, "expected": [{"type": "i32", "value": "5"}]}, + {"type": "assert_return", "line": 121, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "14"}]}, "expected": [{"type": "i32", "value": "2"}]}, + {"type": "assert_return", "line": 122, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "15"}]}, "expected": [{"type": "i32", "value": "9"}]}, + {"type": "assert_return", "line": 123, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "16"}]}, "expected": [{"type": "i32", "value": "2"}]}, + {"type": "assert_return", "line": 124, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "17"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 125, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "18"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 126, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "19"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 127, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "20"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 128, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "21"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 129, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "22"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 130, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "23"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 131, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "24"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 132, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "25"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 133, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "26"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 134, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "27"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 135, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "28"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 136, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "29"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "module", "line": 138, "filename": "memory_init.3.wasm"}, + {"type": "action", "line": 157, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "assert_return", "line": 159, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 160, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 161, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "3"}]}, + {"type": "assert_return", "line": 162, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 163, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "i32", "value": "4"}]}, + {"type": "assert_return", "line": 164, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "5"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 165, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "6"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 166, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "7"}]}, "expected": [{"type": "i32", "value": "2"}]}, + {"type": "assert_return", "line": 167, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "8"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 168, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "9"}]}, "expected": [{"type": "i32", "value": "1"}]}, + {"type": "assert_return", "line": 169, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "10"}]}, "expected": [{"type": "i32", "value": "8"}]}, + {"type": "assert_return", "line": 170, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "11"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 171, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 172, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "13"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 173, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "14"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 174, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "15"}]}, "expected": [{"type": "i32", "value": "5"}]}, + {"type": "assert_return", "line": 175, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "16"}]}, "expected": [{"type": "i32", "value": "2"}]}, + {"type": "assert_return", "line": 176, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "17"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 177, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "18"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 178, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "19"}]}, "expected": [{"type": "i32", "value": "9"}]}, + {"type": "assert_return", "line": 179, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "20"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 180, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "21"}]}, "expected": [{"type": "i32", "value": "7"}]}, + {"type": "assert_return", "line": 181, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "22"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 182, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "23"}]}, "expected": [{"type": "i32", "value": "8"}]}, + {"type": "assert_return", "line": 183, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "24"}]}, "expected": [{"type": "i32", "value": "8"}]}, + {"type": "assert_return", "line": 184, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "25"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 185, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "26"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 186, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "27"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 187, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "28"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_return", "line": 188, "action": {"type": "invoke", "field": "load8_u", "args": [{"type": "i32", "value": "29"}]}, "expected": [{"type": "i32", "value": "0"}]}, + {"type": "assert_invalid", "line": 190, "filename": "memory_init.4.wasm", "text": "unknown data segment", "module_type": "binary"}, + {"type": "assert_invalid", "line": 196, "filename": "memory_init.5.wasm", "text": "unknown data segment", "module_type": "binary"}, + {"type": "module", "line": 203, "filename": "memory_init.6.wasm"}, + {"type": "action", "line": 209, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "module", "line": 211, "filename": "memory_init.7.wasm"}, + {"type": "assert_trap", "line": 217, "action": {"type": "invoke", "field": "test", "args": []}, "text": "out of bounds memory access", "expected": []}, + {"type": "module", "line": 219, "filename": "memory_init.8.wasm"}, + {"type": "assert_trap", "line": 224, "action": {"type": "invoke", "field": "test", "args": []}, "text": "out of bounds memory access", "expected": []}, + {"type": "assert_invalid", "line": 227, "filename": "memory_init.9.wasm", "text": "unknown memory 0", "module_type": "binary"}, + {"type": "assert_invalid", "line": 233, "filename": "memory_init.10.wasm", "text": "unknown data segment 1", "module_type": "binary"}, + {"type": "module", "line": 240, "filename": "memory_init.11.wasm"}, + {"type": "action", "line": 246, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "module", "line": 248, "filename": "memory_init.12.wasm"}, + {"type": "assert_trap", "line": 253, "action": {"type": "invoke", "field": "test", "args": []}, "text": "out of bounds memory access", "expected": []}, + {"type": "module", "line": 255, "filename": "memory_init.13.wasm"}, + {"type": "assert_trap", "line": 260, "action": {"type": "invoke", "field": "test", "args": []}, "text": "out of bounds memory access", "expected": []}, + {"type": "module", "line": 262, "filename": "memory_init.14.wasm"}, + {"type": "assert_trap", "line": 267, "action": {"type": "invoke", "field": "test", "args": []}, "text": "out of bounds memory access", "expected": []}, + {"type": "module", "line": 269, "filename": "memory_init.15.wasm"}, + {"type": "assert_trap", "line": 274, "action": {"type": "invoke", "field": "test", "args": []}, "text": "out of bounds memory access", "expected": []}, + {"type": "module", "line": 276, "filename": "memory_init.16.wasm"}, + {"type": "action", "line": 281, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "module", "line": 283, "filename": "memory_init.17.wasm"}, + {"type": "assert_trap", "line": 288, "action": {"type": "invoke", "field": "test", "args": []}, "text": "out of bounds memory access", "expected": []}, + {"type": "module", "line": 290, "filename": "memory_init.18.wasm"}, + {"type": "action", "line": 295, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "module", "line": 297, "filename": "memory_init.19.wasm"}, + {"type": "action", "line": 302, "action": {"type": "invoke", "field": "test", "args": []}, "expected": []}, + {"type": "module", "line": 304, "filename": "memory_init.20.wasm"}, + {"type": "assert_trap", "line": 309, "action": {"type": "invoke", "field": "test", "args": []}, "text": "out of bounds memory access", "expected": []}, + {"type": "assert_invalid", "line": 312, "filename": "memory_init.21.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 320, "filename": "memory_init.22.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 328, "filename": "memory_init.23.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 336, "filename": "memory_init.24.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 344, "filename": "memory_init.25.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 352, "filename": "memory_init.26.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 360, "filename": "memory_init.27.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 368, "filename": "memory_init.28.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 376, "filename": "memory_init.29.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 384, "filename": "memory_init.30.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 392, "filename": "memory_init.31.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 400, "filename": "memory_init.32.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 408, "filename": "memory_init.33.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 416, "filename": "memory_init.34.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 424, "filename": "memory_init.35.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 432, "filename": "memory_init.36.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 440, "filename": "memory_init.37.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 448, "filename": "memory_init.38.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 456, "filename": "memory_init.39.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 464, "filename": "memory_init.40.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 472, "filename": "memory_init.41.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 480, "filename": "memory_init.42.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 488, "filename": "memory_init.43.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 496, "filename": "memory_init.44.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 504, "filename": "memory_init.45.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 512, "filename": "memory_init.46.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 520, "filename": "memory_init.47.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 528, "filename": "memory_init.48.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 536, "filename": "memory_init.49.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 544, "filename": "memory_init.50.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 552, "filename": "memory_init.51.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 560, "filename": "memory_init.52.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 568, "filename": "memory_init.53.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 576, "filename": "memory_init.54.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 584, "filename": "memory_init.55.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 592, "filename": "memory_init.56.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 600, "filename": "memory_init.57.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 608, "filename": "memory_init.58.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 616, "filename": "memory_init.59.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 624, "filename": "memory_init.60.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 632, "filename": "memory_init.61.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 640, "filename": "memory_init.62.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 648, "filename": "memory_init.63.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 656, "filename": "memory_init.64.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 664, "filename": "memory_init.65.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 672, "filename": "memory_init.66.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 680, "filename": "memory_init.67.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 688, "filename": "memory_init.68.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 696, "filename": "memory_init.69.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 704, "filename": "memory_init.70.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 712, "filename": "memory_init.71.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 720, "filename": "memory_init.72.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 728, "filename": "memory_init.73.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 736, "filename": "memory_init.74.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 744, "filename": "memory_init.75.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 752, "filename": "memory_init.76.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 760, "filename": "memory_init.77.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 768, "filename": "memory_init.78.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 776, "filename": "memory_init.79.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 784, "filename": "memory_init.80.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 792, "filename": "memory_init.81.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 800, "filename": "memory_init.82.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "assert_invalid", "line": 808, "filename": "memory_init.83.wasm", "text": "type mismatch", "module_type": "binary"}, + {"type": "module", "line": 815, "filename": "memory_init.84.wasm"}, + {"type": "assert_trap", "line": 833, "action": {"type": "invoke", "field": "run", "args": [{"type": "i32", "value": "65528"}, {"type": "i32", "value": "16"}]}, "text": "out of bounds memory access", "expected": []}, + {"type": "assert_return", "line": 836, "action": {"type": "invoke", "field": "checkRange", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, + {"type": "module", "line": 838, "filename": "memory_init.85.wasm"}, + {"type": "assert_trap", "line": 856, "action": {"type": "invoke", "field": "run", "args": [{"type": "i32", "value": "65527"}, {"type": "i32", "value": "16"}]}, "text": "out of bounds memory access", "expected": []}, + {"type": "assert_return", "line": 859, "action": {"type": "invoke", "field": "checkRange", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, + {"type": "module", "line": 861, "filename": "memory_init.86.wasm"}, + {"type": "assert_trap", "line": 879, "action": {"type": "invoke", "field": "run", "args": [{"type": "i32", "value": "65472"}, {"type": "i32", "value": "30"}]}, "text": "out of bounds memory access", "expected": []}, + {"type": "assert_return", "line": 882, "action": {"type": "invoke", "field": "checkRange", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, + {"type": "module", "line": 884, "filename": "memory_init.87.wasm"}, + {"type": "assert_trap", "line": 902, "action": {"type": "invoke", "field": "run", "args": [{"type": "i32", "value": "65473"}, {"type": "i32", "value": "31"}]}, "text": "out of bounds memory access", "expected": []}, + {"type": "assert_return", "line": 905, "action": {"type": "invoke", "field": "checkRange", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, + {"type": "module", "line": 907, "filename": "memory_init.88.wasm"}, + {"type": "assert_trap", "line": 925, "action": {"type": "invoke", "field": "run", "args": [{"type": "i32", "value": "65528"}, {"type": "i32", "value": "4294967040"}]}, "text": "out of bounds memory access", "expected": []}, + {"type": "assert_return", "line": 928, "action": {"type": "invoke", "field": "checkRange", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, + {"type": "module", "line": 930, "filename": "memory_init.89.wasm"}, + {"type": "assert_trap", "line": 948, "action": {"type": "invoke", "field": "run", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "4294967292"}]}, "text": "out of bounds memory access", "expected": []}, + {"type": "assert_return", "line": 951, "action": {"type": "invoke", "field": "checkRange", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, + {"type": "module", "line": 954, "filename": "memory_init.90.wasm"}]} diff --git a/tests/memory_init.wast b/tests/memory_init.wast new file mode 100644 index 0000000..672b1c5 --- /dev/null +++ b/tests/memory_init.wast @@ -0,0 +1,967 @@ +;; +;; Generated by ../meta/generate_memory_init.js +;; DO NOT EDIT THIS FILE. CHANGE THE SOURCE AND REGENERATE. +;; + +(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\03\01\04\01") + (data "\02\07\01\08") + (data (i32.const 12) "\07\05\02\03\06") + (data "\05\09\02\07\06") + (func (export "test") + (nop)) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0)))) + +(invoke "test") + +(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3)) +(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4)) +(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5)) +(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2)) +(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3)) +(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6)) +(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0)) + +(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\03\01\04\01") + (data "\02\07\01\08") + (data (i32.const 12) "\07\05\02\03\06") + (data "\05\09\02\07\06") + (func (export "test") + (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0)))) + +(invoke "test") + +(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3)) +(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4)) +(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 2)) +(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 8)) +(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5)) +(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2)) +(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3)) +(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6)) +(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0)) + +(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\03\01\04\01") + (data "\02\07\01\08") + (data (i32.const 12) "\07\05\02\03\06") + (data "\05\09\02\07\06") + (func (export "test") + (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0)))) + +(invoke "test") + +(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3)) +(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4)) +(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5)) +(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2)) +(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 9)) +(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 2)) +(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0)) + +(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\03\01\04\01") + (data "\02\07\01\08") + (data (i32.const 12) "\07\05\02\03\06") + (data "\05\09\02\07\06") + (func (export "test") + (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4)) + (data.drop 1) + (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3)) + (data.drop 3) + (memory.copy (i32.const 20) (i32.const 15) (i32.const 5)) + (memory.copy (i32.const 21) (i32.const 29) (i32.const 1)) + (memory.copy (i32.const 24) (i32.const 10) (i32.const 1)) + (memory.copy (i32.const 13) (i32.const 11) (i32.const 4)) + (memory.copy (i32.const 19) (i32.const 20) (i32.const 5))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0)))) + +(invoke "test") + +(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3)) +(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4)) +(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 2)) +(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 1)) +(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 8)) +(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 5)) +(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 2)) +(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 9)) +(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 7)) +(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 8)) +(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 8)) +(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0)) +(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0)) +(assert_invalid + (module + (func (export "test") + (data.drop 0))) + "unknown data segment") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (data.drop 4))) + "unknown data segment") + +(module + (memory 1) + (data "\37") + (func (export "test") + (data.drop 0) + (data.drop 0))) +(invoke "test") + +(module + (memory 1) + (data "\37") + (func (export "test") + (data.drop 0) + (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1)))) +(assert_trap (invoke "test") "out of bounds memory access") + +(module + (memory 1) + (data (i32.const 0) "\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1)))) +(assert_trap (invoke "test") "out of bounds memory access") + +(assert_invalid + (module + (func (export "test") + (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1)))) + "unknown memory 0") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1)))) + "unknown data segment 1") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1)) + (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1)))) +(invoke "test") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 0) (i32.const 5)))) +(assert_trap (invoke "test") "out of bounds memory access") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 2) (i32.const 3)))) +(assert_trap (invoke "test") "out of bounds memory access") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 0xFFFE) (i32.const 1) (i32.const 3)))) +(assert_trap (invoke "test") "out of bounds memory access") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 4) (i32.const 0)))) +(assert_trap (invoke "test") "out of bounds memory access") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 0)))) +(invoke "test") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 0x10001) (i32.const 0) (i32.const 0)))) +(assert_trap (invoke "test") "out of bounds memory access") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 0x10000) (i32.const 0) (i32.const 0)))) +(invoke "test") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 0x10000) (i32.const 1) (i32.const 0)))) +(invoke "test") + +(module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 0x10001) (i32.const 4) (i32.const 0)))) +(assert_trap (invoke "test") "out of bounds memory access") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i32.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i32.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i32.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f32.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f32.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f32.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f32.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i64.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i64.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i64.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i64.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f64.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f64.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f64.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f64.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i32.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i32.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i32.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i32.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f32.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f32.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f32.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f32.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i64.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i64.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i64.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i64.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f64.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f64.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f64.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f64.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i32.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i32.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i32.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i32.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f32.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f32.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f32.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f32.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i64.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i64.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i64.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i64.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f64.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f64.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f64.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f64.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i32.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i32.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i32.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i32.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f32.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f32.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f32.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f32.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i64.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i64.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i64.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i64.const 1) (f64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f64.const 1) (i32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f64.const 1) (f32.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f64.const 1) (i64.const 1)))) + "type mismatch") + +(assert_invalid + (module + (memory 1) + (data "\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f64.const 1) (f64.const 1)))) + "type mismatch") + +(module + (memory 1 1 ) + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + + (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) + (loop $cont + (if (i32.eq (local.get $from) (local.get $to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected)) + (then + (local.set $from (i32.add (local.get $from) (i32.const 1))) + (br $cont)))) + (return (local.get $from))) + + (func (export "run") (param $offs i32) (param $len i32) + (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len)))) + +(assert_trap (invoke "run" (i32.const 65528) (i32.const 16)) + "out of bounds memory access") + +(assert_return (invoke "checkRange" (i32.const 0) (i32.const 1) (i32.const 0)) + (i32.const -1)) +(module + (memory 1 1 ) + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + + (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) + (loop $cont + (if (i32.eq (local.get $from) (local.get $to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected)) + (then + (local.set $from (i32.add (local.get $from) (i32.const 1))) + (br $cont)))) + (return (local.get $from))) + + (func (export "run") (param $offs i32) (param $len i32) + (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len)))) + +(assert_trap (invoke "run" (i32.const 65527) (i32.const 16)) + "out of bounds memory access") + +(assert_return (invoke "checkRange" (i32.const 0) (i32.const 1) (i32.const 0)) + (i32.const -1)) +(module + (memory 1 1 ) + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + + (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) + (loop $cont + (if (i32.eq (local.get $from) (local.get $to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected)) + (then + (local.set $from (i32.add (local.get $from) (i32.const 1))) + (br $cont)))) + (return (local.get $from))) + + (func (export "run") (param $offs i32) (param $len i32) + (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len)))) + +(assert_trap (invoke "run" (i32.const 65472) (i32.const 30)) + "out of bounds memory access") + +(assert_return (invoke "checkRange" (i32.const 0) (i32.const 1) (i32.const 0)) + (i32.const -1)) +(module + (memory 1 1 ) + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + + (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) + (loop $cont + (if (i32.eq (local.get $from) (local.get $to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected)) + (then + (local.set $from (i32.add (local.get $from) (i32.const 1))) + (br $cont)))) + (return (local.get $from))) + + (func (export "run") (param $offs i32) (param $len i32) + (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len)))) + +(assert_trap (invoke "run" (i32.const 65473) (i32.const 31)) + "out of bounds memory access") + +(assert_return (invoke "checkRange" (i32.const 0) (i32.const 1) (i32.const 0)) + (i32.const -1)) +(module + (memory 1 ) + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + + (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) + (loop $cont + (if (i32.eq (local.get $from) (local.get $to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected)) + (then + (local.set $from (i32.add (local.get $from) (i32.const 1))) + (br $cont)))) + (return (local.get $from))) + + (func (export "run") (param $offs i32) (param $len i32) + (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len)))) + +(assert_trap (invoke "run" (i32.const 65528) (i32.const 4294967040)) + "out of bounds memory access") + +(assert_return (invoke "checkRange" (i32.const 0) (i32.const 1) (i32.const 0)) + (i32.const -1)) +(module + (memory 1 ) + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + + (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) + (loop $cont + (if (i32.eq (local.get $from) (local.get $to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected)) + (then + (local.set $from (i32.add (local.get $from) (i32.const 1))) + (br $cont)))) + (return (local.get $from))) + + (func (export "run") (param $offs i32) (param $len i32) + (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len)))) + +(assert_trap (invoke "run" (i32.const 0) (i32.const 4294967292)) + "out of bounds memory access") + +(assert_return (invoke "checkRange" (i32.const 0) (i32.const 1) (i32.const 0)) + (i32.const -1)) + +(module + (memory 1) + ;; 65 data segments. 64 is the smallest positive number that is encoded + ;; differently as a signed LEB. + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") + (func (memory.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))