Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
call_indirect_tests.cpp File Reference
#include <algorithm>
#include <vector>
#include <iostream>
#include <iterator>
#include <cmath>
#include <cstdlib>
#include <catch2/catch.hpp>
#include <utils.hpp>
#include <wasm_config.hpp>
#include <sysio/vm/backend.hpp>
Include dependency graph for call_indirect_tests.cpp:

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Testing wasm <call_indirect_0_wasm>", "[call_indirect_0_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_12_wasm>", "[call_indirect_12_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_13_wasm>", "[call_indirect_13_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_14_wasm>", "[call_indirect_14_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_15_wasm>", "[call_indirect_15_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_16_wasm>", "[call_indirect_16_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_17_wasm>", "[call_indirect_17_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_18_wasm>", "[call_indirect_18_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_19_wasm>", "[call_indirect_19_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_20_wasm>", "[call_indirect_20_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_21_wasm>", "[call_indirect_21_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_22_wasm>", "[call_indirect_22_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_23_wasm>", "[call_indirect_23_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_24_wasm>", "[call_indirect_24_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_25_wasm>", "[call_indirect_25_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_26_wasm>", "[call_indirect_26_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_27_wasm>", "[call_indirect_27_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_28_wasm>", "[call_indirect_28_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_29_wasm>", "[call_indirect_29_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_30_wasm>", "[call_indirect_30_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_31_wasm>", "[call_indirect_31_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_32_wasm>", "[call_indirect_32_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <call_indirect_33_wasm>", "[call_indirect_33_wasm_tests]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_0_wasm>" ,
"" [call_indirect_0_wasm_tests] )

Definition at line 18 of file call_indirect_tests.cpp.

18 {
20 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.0.wasm");
21 backend_t bkend( code, &wa );
22
23 CHECK(bkend.call_with_return("env", "type-i32")->to_ui32() == UINT32_C(306));
24 CHECK(bkend.call_with_return("env", "type-i64")->to_ui64() == UINT32_C(356));
25 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "type-f32")->to_f32()) == UINT32_C(1165172736));
26 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "type-f64")->to_f64()) == UINT64_C(4660882566700597248));
27 CHECK(bkend.call_with_return("env", "type-index")->to_ui64() == UINT32_C(100));
28 CHECK(bkend.call_with_return("env", "type-first-i32")->to_ui32() == UINT32_C(32));
29 CHECK(bkend.call_with_return("env", "type-first-i64")->to_ui64() == UINT32_C(64));
30 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "type-first-f32")->to_f32()) == UINT32_C(1068037571));
31 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "type-first-f64")->to_f64()) == UINT64_C(4610064722561534525));
32 CHECK(bkend.call_with_return("env", "type-second-i32")->to_ui32() == UINT32_C(32));
33 CHECK(bkend.call_with_return("env", "type-second-i64")->to_ui64() == UINT32_C(64));
34 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "type-second-f32")->to_f32()) == UINT32_C(1107296256));
35 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "type-second-f64")->to_f64()) == UINT64_C(4634211053438658150));
36 CHECK(bkend.call_with_return("env", "dispatch", UINT32_C(5), UINT64_C(2))->to_ui64() == UINT32_C(2));
37 CHECK(bkend.call_with_return("env", "dispatch", UINT32_C(5), UINT64_C(5))->to_ui64() == UINT32_C(5));
38 CHECK(bkend.call_with_return("env", "dispatch", UINT32_C(12), UINT64_C(5))->to_ui64() == UINT32_C(120));
39 CHECK(bkend.call_with_return("env", "dispatch", UINT32_C(13), UINT64_C(5))->to_ui64() == UINT32_C(8));
40 CHECK(bkend.call_with_return("env", "dispatch", UINT32_C(20), UINT64_C(2))->to_ui64() == UINT32_C(2));
41 CHECK_THROWS_AS(bkend("env", "dispatch", UINT32_C(0), UINT64_C(2)), std::exception);
42 CHECK_THROWS_AS(bkend("env", "dispatch", UINT32_C(15), UINT64_C(2)), std::exception);
43 CHECK_THROWS_AS(bkend("env", "dispatch", UINT32_C(29), UINT64_C(2)), std::exception);
44 CHECK_THROWS_AS(bkend("env", "dispatch", UINT32_C(4294967295), UINT64_C(2)), std::exception);
45 CHECK_THROWS_AS(bkend("env", "dispatch", UINT32_C(1213432423), UINT64_C(2)), std::exception);
46 CHECK(bkend.call_with_return("env", "dispatch-structural-i64", UINT32_C(5))->to_ui64() == UINT32_C(9));
47 CHECK(bkend.call_with_return("env", "dispatch-structural-i64", UINT32_C(12))->to_ui64() == UINT32_C(362880));
48 CHECK(bkend.call_with_return("env", "dispatch-structural-i64", UINT32_C(13))->to_ui64() == UINT32_C(55));
49 CHECK(bkend.call_with_return("env", "dispatch-structural-i64", UINT32_C(20))->to_ui64() == UINT32_C(9));
50 CHECK_THROWS_AS(bkend("env", "dispatch-structural-i64", UINT32_C(11)), std::exception);
51 CHECK_THROWS_AS(bkend("env", "dispatch-structural-i64", UINT32_C(22)), std::exception);
52 CHECK(bkend.call_with_return("env", "dispatch-structural-i32", UINT32_C(4))->to_ui32() == UINT32_C(9));
53 CHECK(bkend.call_with_return("env", "dispatch-structural-i32", UINT32_C(23))->to_ui32() == UINT32_C(362880));
54 CHECK(bkend.call_with_return("env", "dispatch-structural-i32", UINT32_C(26))->to_ui32() == UINT32_C(55));
55 CHECK(bkend.call_with_return("env", "dispatch-structural-i32", UINT32_C(19))->to_ui32() == UINT32_C(9));
56 CHECK_THROWS_AS(bkend("env", "dispatch-structural-i32", UINT32_C(9)), std::exception);
57 CHECK_THROWS_AS(bkend("env", "dispatch-structural-i32", UINT32_C(21)), std::exception);
58 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "dispatch-structural-f32", UINT32_C(6))->to_f32()) == UINT32_C(1091567616));
59 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "dispatch-structural-f32", UINT32_C(24))->to_f32()) == UINT32_C(1219571712));
60 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "dispatch-structural-f32", UINT32_C(27))->to_f32()) == UINT32_C(1113325568));
61 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "dispatch-structural-f32", UINT32_C(21))->to_f32()) == UINT32_C(1091567616));
62 CHECK_THROWS_AS(bkend("env", "dispatch-structural-f32", UINT32_C(8)), std::exception);
63 CHECK_THROWS_AS(bkend("env", "dispatch-structural-f32", UINT32_C(19)), std::exception);
64 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "dispatch-structural-f64", UINT32_C(7))->to_f64()) == UINT64_C(4621256167635550208));
65 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "dispatch-structural-f64", UINT32_C(25))->to_f64()) == UINT64_C(4689977843394805760));
66 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "dispatch-structural-f64", UINT32_C(28))->to_f64()) == UINT64_C(4632937379169042432));
67 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "dispatch-structural-f64", UINT32_C(22))->to_f64()) == UINT64_C(4621256167635550208));
68 CHECK_THROWS_AS(bkend("env", "dispatch-structural-f64", UINT32_C(10)), std::exception);
69 CHECK_THROWS_AS(bkend("env", "dispatch-structural-f64", UINT32_C(18)), std::exception);
70 CHECK(bkend.call_with_return("env", "fac-i64", UINT64_C(0))->to_ui64() == UINT32_C(1));
71 CHECK(bkend.call_with_return("env", "fac-i64", UINT64_C(1))->to_ui64() == UINT32_C(1));
72 CHECK(bkend.call_with_return("env", "fac-i64", UINT64_C(5))->to_ui64() == UINT32_C(120));
73 CHECK(bkend.call_with_return("env", "fac-i64", UINT64_C(25))->to_ui64() == UINT32_C(7034535277573963776));
74 CHECK(bkend.call_with_return("env", "fac-i32", UINT32_C(0))->to_ui32() == UINT32_C(1));
75 CHECK(bkend.call_with_return("env", "fac-i32", UINT32_C(1))->to_ui32() == UINT32_C(1));
76 CHECK(bkend.call_with_return("env", "fac-i32", UINT32_C(5))->to_ui32() == UINT32_C(120));
77 CHECK(bkend.call_with_return("env", "fac-i32", UINT32_C(10))->to_ui32() == UINT32_C(3628800));
78 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fac-f32", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(1065353216));
79 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fac-f32", bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(1065353216));
80 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fac-f32", bit_cast<float>(UINT32_C(1084227584)))->to_f32()) == UINT32_C(1123024896));
81 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fac-f32", bit_cast<float>(UINT32_C(1092616192)))->to_f32()) == UINT32_C(1247640576));
82 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fac-f64", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4607182418800017408));
83 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fac-f64", bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4607182418800017408));
84 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fac-f64", bit_cast<double>(UINT64_C(4617315517961601024)))->to_f64()) == UINT64_C(4638144666238189568));
85 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fac-f64", bit_cast<double>(UINT64_C(4621819117588971520)))->to_f64()) == UINT64_C(4705047200009289728));
86 CHECK(bkend.call_with_return("env", "fib-i64", UINT64_C(0))->to_ui64() == UINT32_C(1));
87 CHECK(bkend.call_with_return("env", "fib-i64", UINT64_C(1))->to_ui64() == UINT32_C(1));
88 CHECK(bkend.call_with_return("env", "fib-i64", UINT64_C(2))->to_ui64() == UINT32_C(2));
89 CHECK(bkend.call_with_return("env", "fib-i64", UINT64_C(5))->to_ui64() == UINT32_C(8));
90 CHECK(bkend.call_with_return("env", "fib-i64", UINT64_C(20))->to_ui64() == UINT32_C(10946));
91 CHECK(bkend.call_with_return("env", "fib-i32", UINT32_C(0))->to_ui32() == UINT32_C(1));
92 CHECK(bkend.call_with_return("env", "fib-i32", UINT32_C(1))->to_ui32() == UINT32_C(1));
93 CHECK(bkend.call_with_return("env", "fib-i32", UINT32_C(2))->to_ui32() == UINT32_C(2));
94 CHECK(bkend.call_with_return("env", "fib-i32", UINT32_C(5))->to_ui32() == UINT32_C(8));
95 CHECK(bkend.call_with_return("env", "fib-i32", UINT32_C(20))->to_ui32() == UINT32_C(10946));
96 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fib-f32", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(1065353216));
97 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fib-f32", bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(1065353216));
98 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fib-f32", bit_cast<float>(UINT32_C(1073741824)))->to_f32()) == UINT32_C(1073741824));
99 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fib-f32", bit_cast<float>(UINT32_C(1084227584)))->to_f32()) == UINT32_C(1090519040));
100 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "fib-f32", bit_cast<float>(UINT32_C(1101004800)))->to_f32()) == UINT32_C(1177225216));
101 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fib-f64", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4607182418800017408));
102 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fib-f64", bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4607182418800017408));
103 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fib-f64", bit_cast<double>(UINT64_C(4611686018427387904)))->to_f64()) == UINT64_C(4611686018427387904));
104 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fib-f64", bit_cast<double>(UINT64_C(4617315517961601024)))->to_f64()) == UINT64_C(4620693217682128896));
105 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "fib-f64", bit_cast<double>(UINT64_C(4626322717216342016)))->to_f64()) == UINT64_C(4667243241467281408));
106 CHECK(bkend.call_with_return("env", "even", UINT32_C(0))->to_ui32() == UINT32_C(44));
107 CHECK(bkend.call_with_return("env", "even", UINT32_C(1))->to_ui32() == UINT32_C(99));
108 CHECK(bkend.call_with_return("env", "even", UINT32_C(100))->to_ui32() == UINT32_C(44));
109 CHECK(bkend.call_with_return("env", "even", UINT32_C(77))->to_ui32() == UINT32_C(99));
110 CHECK(bkend.call_with_return("env", "odd", UINT32_C(0))->to_ui32() == UINT32_C(99));
111 CHECK(bkend.call_with_return("env", "odd", UINT32_C(1))->to_ui32() == UINT32_C(44));
112 CHECK(bkend.call_with_return("env", "odd", UINT32_C(200))->to_ui32() == UINT32_C(99));
113 CHECK(bkend.call_with_return("env", "odd", UINT32_C(77))->to_ui32() == UINT32_C(44));
114 CHECK(bkend.call_with_return("env", "as-select-first")->to_ui32() == UINT32_C(306));
115 CHECK(bkend.call_with_return("env", "as-select-mid")->to_ui32() == UINT32_C(2));
116 CHECK(bkend.call_with_return("env", "as-select-last")->to_ui32() == UINT32_C(2));
117 CHECK(bkend.call_with_return("env", "as-if-condition")->to_ui32() == UINT32_C(1));
118 CHECK(bkend.call_with_return("env", "as-br_if-first")->to_ui64() == UINT32_C(356));
119 CHECK(bkend.call_with_return("env", "as-br_if-last")->to_ui32() == UINT32_C(2));
120 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "as-br_table-first")->to_f32()) == UINT32_C(1165172736));
121 CHECK(bkend.call_with_return("env", "as-br_table-last")->to_ui32() == UINT32_C(2));
122 CHECK(!bkend.call_with_return("env", "as-store-first"));
123 CHECK(!bkend.call_with_return("env", "as-store-last"));
124 CHECK(bkend.call_with_return("env", "as-memory.grow-value")->to_ui32() == UINT32_C(1));
125 CHECK(bkend.call_with_return("env", "as-return-value")->to_ui32() == UINT32_C(1));
126 CHECK(!bkend.call_with_return("env", "as-drop-operand"));
127 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "as-br-value")->to_f32()) == UINT32_C(1065353216));
128 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "as-local.set-value")->to_f64()) == UINT64_C(4607182418800017408));
129 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "as-local.tee-value")->to_f64()) == UINT64_C(4607182418800017408));
130 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "as-global.set-value")->to_f64()) == UINT64_C(4607182418800017408));
131 CHECK(bkend.call_with_return("env", "as-load-operand")->to_ui32() == UINT32_C(1));
132 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "as-unary-operand")->to_f32()) == UINT32_C(0));
133 CHECK(bkend.call_with_return("env", "as-binary-left")->to_ui32() == UINT32_C(11));
134 CHECK(bkend.call_with_return("env", "as-binary-right")->to_ui32() == UINT32_C(9));
135 CHECK(bkend.call_with_return("env", "as-test-operand")->to_ui32() == UINT32_C(0));
136 CHECK(bkend.call_with_return("env", "as-compare-left")->to_ui32() == UINT32_C(1));
137 CHECK(bkend.call_with_return("env", "as-compare-right")->to_ui32() == UINT32_C(1));
138 CHECK(bkend.call_with_return("env", "as-convert-operand")->to_ui64() == UINT32_C(1));
139}
wasm_allocator wa
Definition main.cpp:10
auto call_with_return(host_t &host, const std::string_view &mod, const std::string_view &func, Args... args)
Definition backend.hpp:178
#define CHECK(cond)
Definition util.h:80
backend_t bkend(hello_wasm, ehm, &wa)
#define CHECK_THROWS_AS(expr, exceptionType)
Definition catch.hpp:203
std::vector< uint8_t > read_wasm(const std::string &fname)
Definition utils.hpp:30
#define UINT32_C(val)
Definition stdint.h:283
#define UINT64_C(val)
Definition stdint.h:284
T bit_cast(const U &u)
Definition utils.hpp:35
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [2/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_12_wasm>" ,
"" [call_indirect_12_wasm_tests] )

Definition at line 141 of file call_indirect_tests.cpp.

141 {
143 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.12.wasm");
144 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
145}
sysio::vm::backend< rhf_t > backend_t
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [3/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_13_wasm>" ,
"" [call_indirect_13_wasm_tests] )

Definition at line 147 of file call_indirect_tests.cpp.

147 {
149 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.13.wasm");
150 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
151}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [4/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_14_wasm>" ,
"" [call_indirect_14_wasm_tests] )

Definition at line 153 of file call_indirect_tests.cpp.

153 {
155 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.14.wasm");
156 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
157}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [5/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_15_wasm>" ,
"" [call_indirect_15_wasm_tests] )

Definition at line 159 of file call_indirect_tests.cpp.

159 {
161 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.15.wasm");
162 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
163}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [6/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_16_wasm>" ,
"" [call_indirect_16_wasm_tests] )

Definition at line 165 of file call_indirect_tests.cpp.

165 {
167 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.16.wasm");
168 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
169}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [7/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_17_wasm>" ,
"" [call_indirect_17_wasm_tests] )

Definition at line 171 of file call_indirect_tests.cpp.

171 {
173 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.17.wasm");
174 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
175}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [8/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_18_wasm>" ,
"" [call_indirect_18_wasm_tests] )

Definition at line 177 of file call_indirect_tests.cpp.

177 {
179 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.18.wasm");
180 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
181}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [9/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_19_wasm>" ,
"" [call_indirect_19_wasm_tests] )

Definition at line 183 of file call_indirect_tests.cpp.

183 {
185 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.19.wasm");
186 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
187}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [10/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_20_wasm>" ,
"" [call_indirect_20_wasm_tests] )

Definition at line 189 of file call_indirect_tests.cpp.

189 {
191 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.20.wasm");
192 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
193}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [11/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_21_wasm>" ,
"" [call_indirect_21_wasm_tests] )

Definition at line 195 of file call_indirect_tests.cpp.

195 {
197 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.21.wasm");
198 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
199}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [12/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_22_wasm>" ,
"" [call_indirect_22_wasm_tests] )

Definition at line 201 of file call_indirect_tests.cpp.

201 {
203 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.22.wasm");
204 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
205}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [13/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_23_wasm>" ,
"" [call_indirect_23_wasm_tests] )

Definition at line 207 of file call_indirect_tests.cpp.

207 {
209 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.23.wasm");
210 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
211}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [14/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_24_wasm>" ,
"" [call_indirect_24_wasm_tests] )

Definition at line 213 of file call_indirect_tests.cpp.

213 {
215 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.24.wasm");
216 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
217}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [15/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_25_wasm>" ,
"" [call_indirect_25_wasm_tests] )

Definition at line 219 of file call_indirect_tests.cpp.

219 {
221 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.25.wasm");
222 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
223}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [16/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_26_wasm>" ,
"" [call_indirect_26_wasm_tests] )

Definition at line 225 of file call_indirect_tests.cpp.

225 {
227 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.26.wasm");
228 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
229}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [17/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_27_wasm>" ,
"" [call_indirect_27_wasm_tests] )

Definition at line 231 of file call_indirect_tests.cpp.

231 {
233 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.27.wasm");
234 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
235}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [18/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_28_wasm>" ,
"" [call_indirect_28_wasm_tests] )

Definition at line 237 of file call_indirect_tests.cpp.

237 {
239 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.28.wasm");
240 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
241}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [19/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_29_wasm>" ,
"" [call_indirect_29_wasm_tests] )

Definition at line 243 of file call_indirect_tests.cpp.

243 {
245 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.29.wasm");
246 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
247}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [20/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_30_wasm>" ,
"" [call_indirect_30_wasm_tests] )

Definition at line 249 of file call_indirect_tests.cpp.

249 {
251 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.30.wasm");
252 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
253}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [21/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_31_wasm>" ,
"" [call_indirect_31_wasm_tests] )

Definition at line 255 of file call_indirect_tests.cpp.

255 {
257 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.31.wasm");
258 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
259}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [22/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_32_wasm>" ,
"" [call_indirect_32_wasm_tests] )

Definition at line 261 of file call_indirect_tests.cpp.

261 {
263 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.32.wasm");
264 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
265}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [23/23]

BACKEND_TEST_CASE ( "Testing wasm <call_indirect_33_wasm>" ,
"" [call_indirect_33_wasm_tests] )

Definition at line 267 of file call_indirect_tests.cpp.

267 {
269 auto code = read_wasm( std::string(wasm_directory) + "call_indirect.33.wasm");
270 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
271}
Here is the call graph for this function:

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.