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

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Testing wasm <func_0_wasm>", "[func_0_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_1_wasm>", "[func_1_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_14_wasm>", "[func_14_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_15_wasm>", "[func_15_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_16_wasm>", "[func_16_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_17_wasm>", "[func_17_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_18_wasm>", "[func_18_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_19_wasm>", "[func_19_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_2_wasm>", "[func_2_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_20_wasm>", "[func_20_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_21_wasm>", "[func_21_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_22_wasm>", "[func_22_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_23_wasm>", "[func_23_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_24_wasm>", "[func_24_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_25_wasm>", "[func_25_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_26_wasm>", "[func_26_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_27_wasm>", "[func_27_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_28_wasm>", "[func_28_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_29_wasm>", "[func_29_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_3_wasm>", "[func_3_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_30_wasm>", "[func_30_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_31_wasm>", "[func_31_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_32_wasm>", "[func_32_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_33_wasm>", "[func_33_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_34_wasm>", "[func_34_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_35_wasm>", "[func_35_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_36_wasm>", "[func_36_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_37_wasm>", "[func_37_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_38_wasm>", "[func_38_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_39_wasm>", "[func_39_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_40_wasm>", "[func_40_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_41_wasm>", "[func_41_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_42_wasm>", "[func_42_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <func_43_wasm>", "[func_43_wasm_tests]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/34]

BACKEND_TEST_CASE ( "Testing wasm <func_0_wasm>" ,
"" [func_0_wasm_tests] )

Definition at line 18 of file func_tests.cpp.

18 {
20 auto code = read_wasm( std::string(wasm_directory) + "func.0.wasm");
21 backend_t bkend( code, &wa );
22
23 CHECK(!bkend.call_with_return("env", "type-use-1"));
24 CHECK(bkend.call_with_return("env", "type-use-2")->to_ui32() == UINT32_C(0));
25 CHECK(!bkend.call_with_return("env", "type-use-3", UINT32_C(1)));
26 CHECK(bkend.call_with_return("env", "type-use-4", UINT32_C(1), bit_cast<double>(UINT64_C(4607182418800017408)), UINT32_C(1))->to_ui32() == UINT32_C(0));
27 CHECK(bkend.call_with_return("env", "type-use-5")->to_ui32() == UINT32_C(0));
28 CHECK(!bkend.call_with_return("env", "type-use-6", UINT32_C(1)));
29 CHECK(bkend.call_with_return("env", "type-use-7", UINT32_C(1), bit_cast<double>(UINT64_C(4607182418800017408)), UINT32_C(1))->to_ui32() == UINT32_C(0));
30 CHECK(bkend.call_with_return("env", "local-first-i32")->to_ui32() == UINT32_C(0));
31 CHECK(bkend.call_with_return("env", "local-first-i64")->to_ui64() == UINT32_C(0));
32 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "local-first-f32")->to_f32()) == UINT32_C(0));
33 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "local-first-f64")->to_f64()) == UINT64_C(0));
34 CHECK(bkend.call_with_return("env", "local-second-i32")->to_ui32() == UINT32_C(0));
35 CHECK(bkend.call_with_return("env", "local-second-i64")->to_ui64() == UINT32_C(0));
36 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "local-second-f32")->to_f32()) == UINT32_C(0));
37 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "local-second-f64")->to_f64()) == UINT64_C(0));
38 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "local-mixed")->to_f64()) == UINT64_C(0));
39 CHECK(bkend.call_with_return("env", "param-first-i32", UINT32_C(2), UINT32_C(3))->to_ui32() == UINT32_C(2));
40 CHECK(bkend.call_with_return("env", "param-first-i64", UINT64_C(2), UINT64_C(3))->to_ui64() == UINT32_C(2));
41 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "param-first-f32", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1077936128)))->to_f32()) == UINT32_C(1073741824));
42 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "param-first-f64", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_f64()) == UINT64_C(4611686018427387904));
43 CHECK(bkend.call_with_return("env", "param-second-i32", UINT32_C(2), UINT32_C(3))->to_ui32() == UINT32_C(3));
44 CHECK(bkend.call_with_return("env", "param-second-i64", UINT64_C(2), UINT64_C(3))->to_ui64() == UINT32_C(3));
45 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "param-second-f32", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1077936128)))->to_f32()) == UINT32_C(1077936128));
46 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "param-second-f64", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_f64()) == UINT64_C(4613937818241073152));
47 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "param-mixed", bit_cast<float>(UINT32_C(1065353216)), UINT32_C(2), UINT64_C(3), UINT32_C(4), bit_cast<double>(UINT64_C(4617878467915022336)), UINT32_C(6))->to_f64()) == UINT64_C(4617878467915022336));
48 CHECK(!bkend.call_with_return("env", "empty"));
49 CHECK(!bkend.call_with_return("env", "value-void"));
50 CHECK(bkend.call_with_return("env", "value-i32")->to_ui32() == UINT32_C(77));
51 CHECK(bkend.call_with_return("env", "value-i64")->to_ui64() == UINT32_C(7777));
52 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "value-f32")->to_f32()) == UINT32_C(1117480550));
53 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "value-f64")->to_f64()) == UINT64_C(4635172994171566817));
54 CHECK(!bkend.call_with_return("env", "value-block-void"));
55 CHECK(bkend.call_with_return("env", "value-block-i32")->to_ui32() == UINT32_C(77));
56 CHECK(!bkend.call_with_return("env", "return-empty"));
57 CHECK(bkend.call_with_return("env", "return-i32")->to_ui32() == UINT32_C(78));
58 CHECK(bkend.call_with_return("env", "return-i64")->to_ui64() == UINT32_C(7878));
59 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "return-f32")->to_f32()) == UINT32_C(1117611622));
60 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "return-f64")->to_f64()) == UINT64_C(4635244066603186258));
61 CHECK(bkend.call_with_return("env", "return-block-i32")->to_ui32() == UINT32_C(77));
62 CHECK(!bkend.call_with_return("env", "break-empty"));
63 CHECK(bkend.call_with_return("env", "break-i32")->to_ui32() == UINT32_C(79));
64 CHECK(bkend.call_with_return("env", "break-i64")->to_ui64() == UINT32_C(7979));
65 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "break-f32")->to_f32()) == UINT32_C(1117768909));
66 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "break-f64")->to_f64()) == UINT64_C(4635315139034805699));
67 CHECK(bkend.call_with_return("env", "break-block-i32")->to_ui32() == UINT32_C(77));
68 CHECK(!bkend.call_with_return("env", "break-br_if-empty", UINT32_C(0)));
69 CHECK(!bkend.call_with_return("env", "break-br_if-empty", UINT32_C(2)));
70 CHECK(bkend.call_with_return("env", "break-br_if-num", UINT32_C(0))->to_ui32() == UINT32_C(51));
71 CHECK(bkend.call_with_return("env", "break-br_if-num", UINT32_C(1))->to_ui32() == UINT32_C(50));
72 CHECK(!bkend.call_with_return("env", "break-br_table-empty", UINT32_C(0)));
73 CHECK(!bkend.call_with_return("env", "break-br_table-empty", UINT32_C(1)));
74 CHECK(!bkend.call_with_return("env", "break-br_table-empty", UINT32_C(5)));
75 CHECK(!bkend.call_with_return("env", "break-br_table-empty", UINT32_C(4294967295)));
76 CHECK(bkend.call_with_return("env", "break-br_table-num", UINT32_C(0))->to_ui32() == UINT32_C(50));
77 CHECK(bkend.call_with_return("env", "break-br_table-num", UINT32_C(1))->to_ui32() == UINT32_C(50));
78 CHECK(bkend.call_with_return("env", "break-br_table-num", UINT32_C(10))->to_ui32() == UINT32_C(50));
79 CHECK(bkend.call_with_return("env", "break-br_table-num", UINT32_C(4294967196))->to_ui32() == UINT32_C(50));
80 CHECK(!bkend.call_with_return("env", "break-br_table-nested-empty", UINT32_C(0)));
81 CHECK(!bkend.call_with_return("env", "break-br_table-nested-empty", UINT32_C(1)));
82 CHECK(!bkend.call_with_return("env", "break-br_table-nested-empty", UINT32_C(3)));
83 CHECK(!bkend.call_with_return("env", "break-br_table-nested-empty", UINT32_C(4294967294)));
84 CHECK(bkend.call_with_return("env", "break-br_table-nested-num", UINT32_C(0))->to_ui32() == UINT32_C(52));
85 CHECK(bkend.call_with_return("env", "break-br_table-nested-num", UINT32_C(1))->to_ui32() == UINT32_C(50));
86 CHECK(bkend.call_with_return("env", "break-br_table-nested-num", UINT32_C(2))->to_ui32() == UINT32_C(52));
87 CHECK(bkend.call_with_return("env", "break-br_table-nested-num", UINT32_C(4294967293))->to_ui32() == UINT32_C(52));
88 CHECK(bkend.call_with_return("env", "init-local-i32")->to_ui32() == UINT32_C(0));
89 CHECK(bkend.call_with_return("env", "init-local-i64")->to_ui64() == UINT32_C(0));
90 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "init-local-f32")->to_f32()) == UINT32_C(0));
91 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "init-local-f64")->to_f64()) == UINT64_C(0));
92}
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
wasm_allocator wa
Definition main.cpp:10
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/34]

BACKEND_TEST_CASE ( "Testing wasm <func_14_wasm>" ,
"" [func_14_wasm_tests] )

Definition at line 101 of file func_tests.cpp.

101 {
103 auto code = read_wasm( std::string(wasm_directory) + "func.14.wasm");
104 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
105}
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/34]

BACKEND_TEST_CASE ( "Testing wasm <func_15_wasm>" ,
"" [func_15_wasm_tests] )

Definition at line 107 of file func_tests.cpp.

107 {
109 auto code = read_wasm( std::string(wasm_directory) + "func.15.wasm");
110 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
111}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [4/34]

BACKEND_TEST_CASE ( "Testing wasm <func_16_wasm>" ,
"" [func_16_wasm_tests] )

Definition at line 113 of file func_tests.cpp.

113 {
115 auto code = read_wasm( std::string(wasm_directory) + "func.16.wasm");
116 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
117}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [5/34]

BACKEND_TEST_CASE ( "Testing wasm <func_17_wasm>" ,
"" [func_17_wasm_tests] )

Definition at line 119 of file func_tests.cpp.

119 {
121 auto code = read_wasm( std::string(wasm_directory) + "func.17.wasm");
122 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
123}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [6/34]

BACKEND_TEST_CASE ( "Testing wasm <func_18_wasm>" ,
"" [func_18_wasm_tests] )

Definition at line 125 of file func_tests.cpp.

125 {
127 auto code = read_wasm( std::string(wasm_directory) + "func.18.wasm");
128 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
129}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [7/34]

BACKEND_TEST_CASE ( "Testing wasm <func_19_wasm>" ,
"" [func_19_wasm_tests] )

Definition at line 131 of file func_tests.cpp.

131 {
133 auto code = read_wasm( std::string(wasm_directory) + "func.19.wasm");
134 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
135}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [8/34]

BACKEND_TEST_CASE ( "Testing wasm <func_1_wasm>" ,
"" [func_1_wasm_tests] )

Definition at line 94 of file func_tests.cpp.

94 {
96 auto code = read_wasm( std::string(wasm_directory) + "func.1.wasm");
97 backend_t bkend( code, &wa );
98
99}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [9/34]

BACKEND_TEST_CASE ( "Testing wasm <func_20_wasm>" ,
"" [func_20_wasm_tests] )

Definition at line 143 of file func_tests.cpp.

143 {
145 auto code = read_wasm( std::string(wasm_directory) + "func.20.wasm");
146 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
147}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [10/34]

BACKEND_TEST_CASE ( "Testing wasm <func_21_wasm>" ,
"" [func_21_wasm_tests] )

Definition at line 149 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [11/34]

BACKEND_TEST_CASE ( "Testing wasm <func_22_wasm>" ,
"" [func_22_wasm_tests] )

Definition at line 155 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [12/34]

BACKEND_TEST_CASE ( "Testing wasm <func_23_wasm>" ,
"" [func_23_wasm_tests] )

Definition at line 161 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [13/34]

BACKEND_TEST_CASE ( "Testing wasm <func_24_wasm>" ,
"" [func_24_wasm_tests] )

Definition at line 167 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [14/34]

BACKEND_TEST_CASE ( "Testing wasm <func_25_wasm>" ,
"" [func_25_wasm_tests] )

Definition at line 173 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [15/34]

BACKEND_TEST_CASE ( "Testing wasm <func_26_wasm>" ,
"" [func_26_wasm_tests] )

Definition at line 179 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [16/34]

BACKEND_TEST_CASE ( "Testing wasm <func_27_wasm>" ,
"" [func_27_wasm_tests] )

Definition at line 185 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [17/34]

BACKEND_TEST_CASE ( "Testing wasm <func_28_wasm>" ,
"" [func_28_wasm_tests] )

Definition at line 191 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [18/34]

BACKEND_TEST_CASE ( "Testing wasm <func_29_wasm>" ,
"" [func_29_wasm_tests] )

Definition at line 197 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [19/34]

BACKEND_TEST_CASE ( "Testing wasm <func_2_wasm>" ,
"" [func_2_wasm_tests] )

Definition at line 137 of file func_tests.cpp.

137 {
139 auto code = read_wasm( std::string(wasm_directory) + "func.2.wasm");
140 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
141}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [20/34]

BACKEND_TEST_CASE ( "Testing wasm <func_30_wasm>" ,
"" [func_30_wasm_tests] )

Definition at line 214 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [21/34]

BACKEND_TEST_CASE ( "Testing wasm <func_31_wasm>" ,
"" [func_31_wasm_tests] )

Definition at line 220 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [22/34]

BACKEND_TEST_CASE ( "Testing wasm <func_32_wasm>" ,
"" [func_32_wasm_tests] )

Definition at line 226 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [23/34]

BACKEND_TEST_CASE ( "Testing wasm <func_33_wasm>" ,
"" [func_33_wasm_tests] )

Definition at line 232 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [24/34]

BACKEND_TEST_CASE ( "Testing wasm <func_34_wasm>" ,
"" [func_34_wasm_tests] )

Definition at line 238 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [25/34]

BACKEND_TEST_CASE ( "Testing wasm <func_35_wasm>" ,
"" [func_35_wasm_tests] )

Definition at line 244 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [26/34]

BACKEND_TEST_CASE ( "Testing wasm <func_36_wasm>" ,
"" [func_36_wasm_tests] )

Definition at line 250 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [27/34]

BACKEND_TEST_CASE ( "Testing wasm <func_37_wasm>" ,
"" [func_37_wasm_tests] )

Definition at line 256 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [28/34]

BACKEND_TEST_CASE ( "Testing wasm <func_38_wasm>" ,
"" [func_38_wasm_tests] )

Definition at line 262 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [29/34]

BACKEND_TEST_CASE ( "Testing wasm <func_39_wasm>" ,
"" [func_39_wasm_tests] )

Definition at line 268 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [30/34]

BACKEND_TEST_CASE ( "Testing wasm <func_3_wasm>" ,
"" [func_3_wasm_tests] )

Definition at line 203 of file func_tests.cpp.

203 {
205 auto code = read_wasm( std::string(wasm_directory) + "func.3.wasm");
206 backend_t bkend( code, &wa );
207
208 CHECK(!bkend.call_with_return("env", "signature-explicit-reused"));
209 CHECK(!bkend.call_with_return("env", "signature-implicit-reused"));
210 CHECK(!bkend.call_with_return("env", "signature-explicit-duplicate"));
211 CHECK(!bkend.call_with_return("env", "signature-implicit-duplicate"));
212}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [31/34]

BACKEND_TEST_CASE ( "Testing wasm <func_40_wasm>" ,
"" [func_40_wasm_tests] )

Definition at line 274 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [32/34]

BACKEND_TEST_CASE ( "Testing wasm <func_41_wasm>" ,
"" [func_41_wasm_tests] )

Definition at line 280 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [33/34]

BACKEND_TEST_CASE ( "Testing wasm <func_42_wasm>" ,
"" [func_42_wasm_tests] )

Definition at line 286 of file func_tests.cpp.

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

◆ BACKEND_TEST_CASE() [34/34]

BACKEND_TEST_CASE ( "Testing wasm <func_43_wasm>" ,
"" [func_43_wasm_tests] )

Definition at line 292 of file func_tests.cpp.

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

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.