Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
br_table_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 br_table_tests.cpp:

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Testing wasm <br_table_0_wasm>", "[br_table_0_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_1_wasm>", "[br_table_1_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_10_wasm>", "[br_table_10_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_11_wasm>", "[br_table_11_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_12_wasm>", "[br_table_12_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_13_wasm>", "[br_table_13_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_14_wasm>", "[br_table_14_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_15_wasm>", "[br_table_15_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_16_wasm>", "[br_table_16_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_17_wasm>", "[br_table_17_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_18_wasm>", "[br_table_18_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_19_wasm>", "[br_table_19_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_2_wasm>", "[br_table_2_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_20_wasm>", "[br_table_20_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_21_wasm>", "[br_table_21_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_3_wasm>", "[br_table_3_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_4_wasm>", "[br_table_4_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_5_wasm>", "[br_table_5_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_6_wasm>", "[br_table_6_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_7_wasm>", "[br_table_7_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_8_wasm>", "[br_table_8_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <br_table_9_wasm>", "[br_table_9_wasm_tests]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_0_wasm>" ,
"" [br_table_0_wasm_tests] )

Definition at line 18 of file br_table_tests.cpp.

18 {
20 auto code = read_wasm( std::string(wasm_directory) + "br_table.0.wasm");
21 backend_t bkend( code, &wa );
22
23 CHECK(!bkend.call_with_return("env", "type-i32"));
24 CHECK(!bkend.call_with_return("env", "type-i64"));
25 CHECK(!bkend.call_with_return("env", "type-f32"));
26 CHECK(!bkend.call_with_return("env", "type-f64"));
27 CHECK(bkend.call_with_return("env", "type-i32-value")->to_ui32() == UINT32_C(1));
28 CHECK(bkend.call_with_return("env", "type-i64-value")->to_ui64() == UINT32_C(2));
29 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "type-f32-value")->to_f32()) == UINT32_C(1077936128));
30 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "type-f64-value")->to_f64()) == UINT64_C(4616189618054758400));
31 CHECK(bkend.call_with_return("env", "empty", UINT32_C(0))->to_ui32() == UINT32_C(22));
32 CHECK(bkend.call_with_return("env", "empty", UINT32_C(1))->to_ui32() == UINT32_C(22));
33 CHECK(bkend.call_with_return("env", "empty", UINT32_C(11))->to_ui32() == UINT32_C(22));
34 CHECK(bkend.call_with_return("env", "empty", UINT32_C(4294967295))->to_ui32() == UINT32_C(22));
35 CHECK(bkend.call_with_return("env", "empty", UINT32_C(4294967196))->to_ui32() == UINT32_C(22));
36 CHECK(bkend.call_with_return("env", "empty", UINT32_C(4294967295))->to_ui32() == UINT32_C(22));
37 CHECK(bkend.call_with_return("env", "empty-value", UINT32_C(0))->to_ui32() == UINT32_C(33));
38 CHECK(bkend.call_with_return("env", "empty-value", UINT32_C(1))->to_ui32() == UINT32_C(33));
39 CHECK(bkend.call_with_return("env", "empty-value", UINT32_C(11))->to_ui32() == UINT32_C(33));
40 CHECK(bkend.call_with_return("env", "empty-value", UINT32_C(4294967295))->to_ui32() == UINT32_C(33));
41 CHECK(bkend.call_with_return("env", "empty-value", UINT32_C(4294967196))->to_ui32() == UINT32_C(33));
42 CHECK(bkend.call_with_return("env", "empty-value", UINT32_C(4294967295))->to_ui32() == UINT32_C(33));
43 CHECK(bkend.call_with_return("env", "singleton", UINT32_C(0))->to_ui32() == UINT32_C(22));
44 CHECK(bkend.call_with_return("env", "singleton", UINT32_C(1))->to_ui32() == UINT32_C(20));
45 CHECK(bkend.call_with_return("env", "singleton", UINT32_C(11))->to_ui32() == UINT32_C(20));
46 CHECK(bkend.call_with_return("env", "singleton", UINT32_C(4294967295))->to_ui32() == UINT32_C(20));
47 CHECK(bkend.call_with_return("env", "singleton", UINT32_C(4294967196))->to_ui32() == UINT32_C(20));
48 CHECK(bkend.call_with_return("env", "singleton", UINT32_C(4294967295))->to_ui32() == UINT32_C(20));
49 CHECK(bkend.call_with_return("env", "singleton-value", UINT32_C(0))->to_ui32() == UINT32_C(32));
50 CHECK(bkend.call_with_return("env", "singleton-value", UINT32_C(1))->to_ui32() == UINT32_C(33));
51 CHECK(bkend.call_with_return("env", "singleton-value", UINT32_C(11))->to_ui32() == UINT32_C(33));
52 CHECK(bkend.call_with_return("env", "singleton-value", UINT32_C(4294967295))->to_ui32() == UINT32_C(33));
53 CHECK(bkend.call_with_return("env", "singleton-value", UINT32_C(4294967196))->to_ui32() == UINT32_C(33));
54 CHECK(bkend.call_with_return("env", "singleton-value", UINT32_C(4294967295))->to_ui32() == UINT32_C(33));
55 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(0))->to_ui32() == UINT32_C(103));
56 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(1))->to_ui32() == UINT32_C(102));
57 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(2))->to_ui32() == UINT32_C(101));
58 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(3))->to_ui32() == UINT32_C(100));
59 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(4))->to_ui32() == UINT32_C(104));
60 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(5))->to_ui32() == UINT32_C(104));
61 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(6))->to_ui32() == UINT32_C(104));
62 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(10))->to_ui32() == UINT32_C(104));
63 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(4294967295))->to_ui32() == UINT32_C(104));
64 CHECK(bkend.call_with_return("env", "multiple", UINT32_C(4294967295))->to_ui32() == UINT32_C(104));
65 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(0))->to_ui32() == UINT32_C(213));
66 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(1))->to_ui32() == UINT32_C(212));
67 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(2))->to_ui32() == UINT32_C(211));
68 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(3))->to_ui32() == UINT32_C(210));
69 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(4))->to_ui32() == UINT32_C(214));
70 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(5))->to_ui32() == UINT32_C(214));
71 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(6))->to_ui32() == UINT32_C(214));
72 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(10))->to_ui32() == UINT32_C(214));
73 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(4294967295))->to_ui32() == UINT32_C(214));
74 CHECK(bkend.call_with_return("env", "multiple-value", UINT32_C(4294967295))->to_ui32() == UINT32_C(214));
75 CHECK(bkend.call_with_return("env", "large", UINT32_C(0))->to_ui32() == UINT32_C(0));
76 CHECK(bkend.call_with_return("env", "large", UINT32_C(1))->to_ui32() == UINT32_C(1));
77 CHECK(bkend.call_with_return("env", "large", UINT32_C(100))->to_ui32() == UINT32_C(0));
78 CHECK(bkend.call_with_return("env", "large", UINT32_C(101))->to_ui32() == UINT32_C(1));
79 CHECK(bkend.call_with_return("env", "large", UINT32_C(10000))->to_ui32() == UINT32_C(0));
80 CHECK(bkend.call_with_return("env", "large", UINT32_C(10001))->to_ui32() == UINT32_C(1));
81 CHECK(bkend.call_with_return("env", "large", UINT32_C(1000000))->to_ui32() == UINT32_C(1));
82 CHECK(bkend.call_with_return("env", "large", UINT32_C(1000001))->to_ui32() == UINT32_C(1));
83 CHECK(!bkend.call_with_return("env", "as-block-first"));
84 CHECK(!bkend.call_with_return("env", "as-block-mid"));
85 CHECK(!bkend.call_with_return("env", "as-block-last"));
86 CHECK(bkend.call_with_return("env", "as-block-value")->to_ui32() == UINT32_C(2));
87 CHECK(bkend.call_with_return("env", "as-loop-first")->to_ui32() == UINT32_C(3));
88 CHECK(bkend.call_with_return("env", "as-loop-mid")->to_ui32() == UINT32_C(4));
89 CHECK(bkend.call_with_return("env", "as-loop-last")->to_ui32() == UINT32_C(5));
90 CHECK(bkend.call_with_return("env", "as-br-value")->to_ui32() == UINT32_C(9));
91 CHECK(!bkend.call_with_return("env", "as-br_if-cond"));
92 CHECK(bkend.call_with_return("env", "as-br_if-value")->to_ui32() == UINT32_C(8));
93 CHECK(bkend.call_with_return("env", "as-br_if-value-cond")->to_ui32() == UINT32_C(9));
94 CHECK(!bkend.call_with_return("env", "as-br_table-index"));
95 CHECK(bkend.call_with_return("env", "as-br_table-value")->to_ui32() == UINT32_C(10));
96 CHECK(bkend.call_with_return("env", "as-br_table-value-index")->to_ui32() == UINT32_C(11));
97 CHECK(bkend.call_with_return("env", "as-return-value")->to_ui64() == UINT32_C(7));
98 CHECK(bkend.call_with_return("env", "as-if-cond")->to_ui32() == UINT32_C(2));
99 CHECK(bkend.call_with_return("env", "as-if-then", UINT32_C(1), UINT32_C(6))->to_ui32() == UINT32_C(3));
100 CHECK(bkend.call_with_return("env", "as-if-then", UINT32_C(0), UINT32_C(6))->to_ui32() == UINT32_C(6));
101 CHECK(bkend.call_with_return("env", "as-if-else", UINT32_C(0), UINT32_C(6))->to_ui32() == UINT32_C(4));
102 CHECK(bkend.call_with_return("env", "as-if-else", UINT32_C(1), UINT32_C(6))->to_ui32() == UINT32_C(6));
103 CHECK(bkend.call_with_return("env", "as-select-first", UINT32_C(0), UINT32_C(6))->to_ui32() == UINT32_C(5));
104 CHECK(bkend.call_with_return("env", "as-select-first", UINT32_C(1), UINT32_C(6))->to_ui32() == UINT32_C(5));
105 CHECK(bkend.call_with_return("env", "as-select-second", UINT32_C(0), UINT32_C(6))->to_ui32() == UINT32_C(6));
106 CHECK(bkend.call_with_return("env", "as-select-second", UINT32_C(1), UINT32_C(6))->to_ui32() == UINT32_C(6));
107 CHECK(bkend.call_with_return("env", "as-select-cond")->to_ui32() == UINT32_C(7));
108 CHECK(bkend.call_with_return("env", "as-call-first")->to_ui32() == UINT32_C(12));
109 CHECK(bkend.call_with_return("env", "as-call-mid")->to_ui32() == UINT32_C(13));
110 CHECK(bkend.call_with_return("env", "as-call-last")->to_ui32() == UINT32_C(14));
111 CHECK(bkend.call_with_return("env", "as-call_indirect-first")->to_ui32() == UINT32_C(20));
112 CHECK(bkend.call_with_return("env", "as-call_indirect-mid")->to_ui32() == UINT32_C(21));
113 CHECK(bkend.call_with_return("env", "as-call_indirect-last")->to_ui32() == UINT32_C(22));
114 CHECK(bkend.call_with_return("env", "as-call_indirect-func")->to_ui32() == UINT32_C(23));
115 CHECK(bkend.call_with_return("env", "as-local.set-value")->to_ui32() == UINT32_C(17));
116 CHECK(bkend.call_with_return("env", "as-local.tee-value")->to_ui32() == UINT32_C(1));
117 CHECK(bkend.call_with_return("env", "as-global.set-value")->to_ui32() == UINT32_C(1));
118 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "as-load-address")->to_f32()) == UINT32_C(1071225242));
119 CHECK(bkend.call_with_return("env", "as-loadN-address")->to_ui64() == UINT32_C(30));
120 CHECK(bkend.call_with_return("env", "as-store-address")->to_ui32() == UINT32_C(30));
121 CHECK(bkend.call_with_return("env", "as-store-value")->to_ui32() == UINT32_C(31));
122 CHECK(bkend.call_with_return("env", "as-storeN-address")->to_ui32() == UINT32_C(32));
123 CHECK(bkend.call_with_return("env", "as-storeN-value")->to_ui32() == UINT32_C(33));
124 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "as-unary-operand")->to_f32()) == UINT32_C(1079613850));
125 CHECK(bkend.call_with_return("env", "as-binary-left")->to_ui32() == UINT32_C(3));
126 CHECK(bkend.call_with_return("env", "as-binary-right")->to_ui64() == UINT32_C(45));
127 CHECK(bkend.call_with_return("env", "as-test-operand")->to_ui32() == UINT32_C(44));
128 CHECK(bkend.call_with_return("env", "as-compare-left")->to_ui32() == UINT32_C(43));
129 CHECK(bkend.call_with_return("env", "as-compare-right")->to_ui32() == UINT32_C(42));
130 CHECK(bkend.call_with_return("env", "as-convert-operand")->to_ui32() == UINT32_C(41));
131 CHECK(bkend.call_with_return("env", "as-memory.grow-size")->to_ui32() == UINT32_C(40));
132 CHECK(bkend.call_with_return("env", "nested-block-value", UINT32_C(0))->to_ui32() == UINT32_C(19));
133 CHECK(bkend.call_with_return("env", "nested-block-value", UINT32_C(1))->to_ui32() == UINT32_C(17));
134 CHECK(bkend.call_with_return("env", "nested-block-value", UINT32_C(2))->to_ui32() == UINT32_C(16));
135 CHECK(bkend.call_with_return("env", "nested-block-value", UINT32_C(10))->to_ui32() == UINT32_C(16));
136 CHECK(bkend.call_with_return("env", "nested-block-value", UINT32_C(4294967295))->to_ui32() == UINT32_C(16));
137 CHECK(bkend.call_with_return("env", "nested-block-value", UINT32_C(100000))->to_ui32() == UINT32_C(16));
138 CHECK(bkend.call_with_return("env", "nested-br-value", UINT32_C(0))->to_ui32() == UINT32_C(8));
139 CHECK(bkend.call_with_return("env", "nested-br-value", UINT32_C(1))->to_ui32() == UINT32_C(9));
140 CHECK(bkend.call_with_return("env", "nested-br-value", UINT32_C(2))->to_ui32() == UINT32_C(17));
141 CHECK(bkend.call_with_return("env", "nested-br-value", UINT32_C(11))->to_ui32() == UINT32_C(17));
142 CHECK(bkend.call_with_return("env", "nested-br-value", UINT32_C(4294967292))->to_ui32() == UINT32_C(17));
143 CHECK(bkend.call_with_return("env", "nested-br-value", UINT32_C(10213210))->to_ui32() == UINT32_C(17));
144 CHECK(bkend.call_with_return("env", "nested-br_if-value", UINT32_C(0))->to_ui32() == UINT32_C(17));
145 CHECK(bkend.call_with_return("env", "nested-br_if-value", UINT32_C(1))->to_ui32() == UINT32_C(9));
146 CHECK(bkend.call_with_return("env", "nested-br_if-value", UINT32_C(2))->to_ui32() == UINT32_C(8));
147 CHECK(bkend.call_with_return("env", "nested-br_if-value", UINT32_C(9))->to_ui32() == UINT32_C(8));
148 CHECK(bkend.call_with_return("env", "nested-br_if-value", UINT32_C(4294967287))->to_ui32() == UINT32_C(8));
149 CHECK(bkend.call_with_return("env", "nested-br_if-value", UINT32_C(999999))->to_ui32() == UINT32_C(8));
150 CHECK(bkend.call_with_return("env", "nested-br_if-value-cond", UINT32_C(0))->to_ui32() == UINT32_C(9));
151 CHECK(bkend.call_with_return("env", "nested-br_if-value-cond", UINT32_C(1))->to_ui32() == UINT32_C(8));
152 CHECK(bkend.call_with_return("env", "nested-br_if-value-cond", UINT32_C(2))->to_ui32() == UINT32_C(9));
153 CHECK(bkend.call_with_return("env", "nested-br_if-value-cond", UINT32_C(3))->to_ui32() == UINT32_C(9));
154 CHECK(bkend.call_with_return("env", "nested-br_if-value-cond", UINT32_C(4293967296))->to_ui32() == UINT32_C(9));
155 CHECK(bkend.call_with_return("env", "nested-br_if-value-cond", UINT32_C(9423975))->to_ui32() == UINT32_C(9));
156 CHECK(bkend.call_with_return("env", "nested-br_table-value", UINT32_C(0))->to_ui32() == UINT32_C(17));
157 CHECK(bkend.call_with_return("env", "nested-br_table-value", UINT32_C(1))->to_ui32() == UINT32_C(9));
158 CHECK(bkend.call_with_return("env", "nested-br_table-value", UINT32_C(2))->to_ui32() == UINT32_C(8));
159 CHECK(bkend.call_with_return("env", "nested-br_table-value", UINT32_C(9))->to_ui32() == UINT32_C(8));
160 CHECK(bkend.call_with_return("env", "nested-br_table-value", UINT32_C(4294967287))->to_ui32() == UINT32_C(8));
161 CHECK(bkend.call_with_return("env", "nested-br_table-value", UINT32_C(999999))->to_ui32() == UINT32_C(8));
162 CHECK(bkend.call_with_return("env", "nested-br_table-value-index", UINT32_C(0))->to_ui32() == UINT32_C(9));
163 CHECK(bkend.call_with_return("env", "nested-br_table-value-index", UINT32_C(1))->to_ui32() == UINT32_C(8));
164 CHECK(bkend.call_with_return("env", "nested-br_table-value-index", UINT32_C(2))->to_ui32() == UINT32_C(9));
165 CHECK(bkend.call_with_return("env", "nested-br_table-value-index", UINT32_C(3))->to_ui32() == UINT32_C(9));
166 CHECK(bkend.call_with_return("env", "nested-br_table-value-index", UINT32_C(4293967296))->to_ui32() == UINT32_C(9));
167 CHECK(bkend.call_with_return("env", "nested-br_table-value-index", UINT32_C(9423975))->to_ui32() == UINT32_C(9));
168 CHECK(bkend.call_with_return("env", "nested-br_table-loop-block", UINT32_C(1))->to_ui32() == UINT32_C(3));
169}
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)
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/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_10_wasm>" ,
"" [br_table_10_wasm_tests] )

Definition at line 177 of file br_table_tests.cpp.

177 {
179 auto code = read_wasm( std::string(wasm_directory) + "br_table.10.wasm");
180 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
181}
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
Definition catch.hpp:203
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [3/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_11_wasm>" ,
"" [br_table_11_wasm_tests] )

Definition at line 183 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [4/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_12_wasm>" ,
"" [br_table_12_wasm_tests] )

Definition at line 189 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [5/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_13_wasm>" ,
"" [br_table_13_wasm_tests] )

Definition at line 195 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [6/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_14_wasm>" ,
"" [br_table_14_wasm_tests] )

Definition at line 201 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [7/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_15_wasm>" ,
"" [br_table_15_wasm_tests] )

Definition at line 207 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [8/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_16_wasm>" ,
"" [br_table_16_wasm_tests] )

Definition at line 213 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [9/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_17_wasm>" ,
"" [br_table_17_wasm_tests] )

Definition at line 219 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [10/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_18_wasm>" ,
"" [br_table_18_wasm_tests] )

Definition at line 225 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [11/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_19_wasm>" ,
"" [br_table_19_wasm_tests] )

Definition at line 231 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [12/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_1_wasm>" ,
"" [br_table_1_wasm_tests] )

Definition at line 171 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [13/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_20_wasm>" ,
"" [br_table_20_wasm_tests] )

Definition at line 243 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [14/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_21_wasm>" ,
"" [br_table_21_wasm_tests] )

Definition at line 249 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [15/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_2_wasm>" ,
"" [br_table_2_wasm_tests] )

Definition at line 237 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [16/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_3_wasm>" ,
"" [br_table_3_wasm_tests] )

Definition at line 255 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [17/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_4_wasm>" ,
"" [br_table_4_wasm_tests] )

Definition at line 261 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [18/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_5_wasm>" ,
"" [br_table_5_wasm_tests] )

Definition at line 267 of file br_table_tests.cpp.

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

◆ BACKEND_TEST_CASE() [19/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_6_wasm>" ,
"" [br_table_6_wasm_tests] )

Definition at line 273 of file br_table_tests.cpp.

273 {
275 auto code = read_wasm( std::string(wasm_directory) + "br_table.6.wasm");
276 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
277}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [20/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_7_wasm>" ,
"" [br_table_7_wasm_tests] )

Definition at line 279 of file br_table_tests.cpp.

279 {
281 auto code = read_wasm( std::string(wasm_directory) + "br_table.7.wasm");
282 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
283}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [21/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_8_wasm>" ,
"" [br_table_8_wasm_tests] )

Definition at line 285 of file br_table_tests.cpp.

285 {
287 auto code = read_wasm( std::string(wasm_directory) + "br_table.8.wasm");
288 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
289}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [22/22]

BACKEND_TEST_CASE ( "Testing wasm <br_table_9_wasm>" ,
"" [br_table_9_wasm_tests] )

Definition at line 291 of file br_table_tests.cpp.

291 {
293 auto code = read_wasm( std::string(wasm_directory) + "br_table.9.wasm");
294 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
295}
Here is the call graph for this function:

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.