Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
store_tests.cpp
Go to the documentation of this file.
1// Generated by spec_test_generator. DO NOT MODIFY THIS FILE.
2
3#include <algorithm>
4#include <vector>
5#include <iostream>
6#include <iterator>
7#include <cmath>
8#include <cstdlib>
9#include <catch2/catch.hpp>
10#include <utils.hpp>
11#include <wasm_config.hpp>
12#include <sysio/vm/backend.hpp>
13
14using namespace sysio;
15using namespace sysio::vm;
16extern wasm_allocator wa;
17
18BACKEND_TEST_CASE( "Testing wasm <store_0_wasm>", "[store_0_wasm_tests]" ) {
20 auto code = read_wasm( std::string(wasm_directory) + "store.0.wasm");
21 backend_t bkend( code, &wa );
22
23 CHECK(!bkend.call_with_return("env", "as-block-value"));
24 CHECK(!bkend.call_with_return("env", "as-loop-value"));
25 CHECK(!bkend.call_with_return("env", "as-br-value"));
26 CHECK(!bkend.call_with_return("env", "as-br_if-value"));
27 CHECK(!bkend.call_with_return("env", "as-br_if-value-cond"));
28 CHECK(!bkend.call_with_return("env", "as-br_table-value"));
29 CHECK(!bkend.call_with_return("env", "as-return-value"));
30 CHECK(!bkend.call_with_return("env", "as-if-then"));
31 CHECK(!bkend.call_with_return("env", "as-if-else"));
32}
33
34BACKEND_TEST_CASE( "Testing wasm <store_10_wasm>", "[store_10_wasm_tests]" ) {
36 auto code = read_wasm( std::string(wasm_directory) + "store.10.wasm");
37 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
38}
39
40BACKEND_TEST_CASE( "Testing wasm <store_11_wasm>", "[store_11_wasm_tests]" ) {
42 auto code = read_wasm( std::string(wasm_directory) + "store.11.wasm");
43 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
44}
45
46BACKEND_TEST_CASE( "Testing wasm <store_12_wasm>", "[store_12_wasm_tests]" ) {
48 auto code = read_wasm( std::string(wasm_directory) + "store.12.wasm");
49 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
50}
51
52BACKEND_TEST_CASE( "Testing wasm <store_13_wasm>", "[store_13_wasm_tests]" ) {
54 auto code = read_wasm( std::string(wasm_directory) + "store.13.wasm");
55 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
56}
57
58BACKEND_TEST_CASE( "Testing wasm <store_14_wasm>", "[store_14_wasm_tests]" ) {
60 auto code = read_wasm( std::string(wasm_directory) + "store.14.wasm");
61 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
62}
63
64BACKEND_TEST_CASE( "Testing wasm <store_15_wasm>", "[store_15_wasm_tests]" ) {
66 auto code = read_wasm( std::string(wasm_directory) + "store.15.wasm");
67 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
68}
69
70BACKEND_TEST_CASE( "Testing wasm <store_16_wasm>", "[store_16_wasm_tests]" ) {
72 auto code = read_wasm( std::string(wasm_directory) + "store.16.wasm");
73 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
74}
75
76BACKEND_TEST_CASE( "Testing wasm <store_17_wasm>", "[store_17_wasm_tests]" ) {
78 auto code = read_wasm( std::string(wasm_directory) + "store.17.wasm");
79 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
80}
81
82BACKEND_TEST_CASE( "Testing wasm <store_18_wasm>", "[store_18_wasm_tests]" ) {
84 auto code = read_wasm( std::string(wasm_directory) + "store.18.wasm");
85 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
86}
87
88BACKEND_TEST_CASE( "Testing wasm <store_19_wasm>", "[store_19_wasm_tests]" ) {
90 auto code = read_wasm( std::string(wasm_directory) + "store.19.wasm");
91 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
92}
93
94BACKEND_TEST_CASE( "Testing wasm <store_20_wasm>", "[store_20_wasm_tests]" ) {
96 auto code = read_wasm( std::string(wasm_directory) + "store.20.wasm");
97 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
98}
99
100BACKEND_TEST_CASE( "Testing wasm <store_21_wasm>", "[store_21_wasm_tests]" ) {
102 auto code = read_wasm( std::string(wasm_directory) + "store.21.wasm");
103 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
104}
105
106BACKEND_TEST_CASE( "Testing wasm <store_22_wasm>", "[store_22_wasm_tests]" ) {
108 auto code = read_wasm( std::string(wasm_directory) + "store.22.wasm");
109 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
110}
111
112BACKEND_TEST_CASE( "Testing wasm <store_23_wasm>", "[store_23_wasm_tests]" ) {
114 auto code = read_wasm( std::string(wasm_directory) + "store.23.wasm");
115 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
116}
117
118BACKEND_TEST_CASE( "Testing wasm <store_24_wasm>", "[store_24_wasm_tests]" ) {
120 auto code = read_wasm( std::string(wasm_directory) + "store.24.wasm");
121 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
122}
123
124BACKEND_TEST_CASE( "Testing wasm <store_25_wasm>", "[store_25_wasm_tests]" ) {
126 auto code = read_wasm( std::string(wasm_directory) + "store.25.wasm");
127 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
128}
129
130BACKEND_TEST_CASE( "Testing wasm <store_26_wasm>", "[store_26_wasm_tests]" ) {
132 auto code = read_wasm( std::string(wasm_directory) + "store.26.wasm");
133 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
134}
135
136BACKEND_TEST_CASE( "Testing wasm <store_27_wasm>", "[store_27_wasm_tests]" ) {
138 auto code = read_wasm( std::string(wasm_directory) + "store.27.wasm");
139 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
140}
141
142BACKEND_TEST_CASE( "Testing wasm <store_28_wasm>", "[store_28_wasm_tests]" ) {
144 auto code = read_wasm( std::string(wasm_directory) + "store.28.wasm");
145 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
146}
147
148BACKEND_TEST_CASE( "Testing wasm <store_29_wasm>", "[store_29_wasm_tests]" ) {
150 auto code = read_wasm( std::string(wasm_directory) + "store.29.wasm");
151 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
152}
153
154BACKEND_TEST_CASE( "Testing wasm <store_30_wasm>", "[store_30_wasm_tests]" ) {
156 auto code = read_wasm( std::string(wasm_directory) + "store.30.wasm");
157 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
158}
159
160BACKEND_TEST_CASE( "Testing wasm <store_31_wasm>", "[store_31_wasm_tests]" ) {
162 auto code = read_wasm( std::string(wasm_directory) + "store.31.wasm");
163 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
164}
165
166BACKEND_TEST_CASE( "Testing wasm <store_32_wasm>", "[store_32_wasm_tests]" ) {
168 auto code = read_wasm( std::string(wasm_directory) + "store.32.wasm");
169 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
170}
171
172BACKEND_TEST_CASE( "Testing wasm <store_33_wasm>", "[store_33_wasm_tests]" ) {
174 auto code = read_wasm( std::string(wasm_directory) + "store.33.wasm");
175 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
176}
177
178BACKEND_TEST_CASE( "Testing wasm <store_34_wasm>", "[store_34_wasm_tests]" ) {
180 auto code = read_wasm( std::string(wasm_directory) + "store.34.wasm");
181 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
182}
183
184BACKEND_TEST_CASE( "Testing wasm <store_35_wasm>", "[store_35_wasm_tests]" ) {
186 auto code = read_wasm( std::string(wasm_directory) + "store.35.wasm");
187 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
188}
189
190BACKEND_TEST_CASE( "Testing wasm <store_36_wasm>", "[store_36_wasm_tests]" ) {
192 auto code = read_wasm( std::string(wasm_directory) + "store.36.wasm");
193 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
194}
195
196BACKEND_TEST_CASE( "Testing wasm <store_37_wasm>", "[store_37_wasm_tests]" ) {
198 auto code = read_wasm( std::string(wasm_directory) + "store.37.wasm");
199 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
200}
201
202BACKEND_TEST_CASE( "Testing wasm <store_38_wasm>", "[store_38_wasm_tests]" ) {
204 auto code = read_wasm( std::string(wasm_directory) + "store.38.wasm");
205 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
206}
207
208BACKEND_TEST_CASE( "Testing wasm <store_39_wasm>", "[store_39_wasm_tests]" ) {
210 auto code = read_wasm( std::string(wasm_directory) + "store.39.wasm");
211 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
212}
213
214BACKEND_TEST_CASE( "Testing wasm <store_40_wasm>", "[store_40_wasm_tests]" ) {
216 auto code = read_wasm( std::string(wasm_directory) + "store.40.wasm");
217 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
218}
219
220BACKEND_TEST_CASE( "Testing wasm <store_41_wasm>", "[store_41_wasm_tests]" ) {
222 auto code = read_wasm( std::string(wasm_directory) + "store.41.wasm");
223 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
224}
225
226BACKEND_TEST_CASE( "Testing wasm <store_42_wasm>", "[store_42_wasm_tests]" ) {
228 auto code = read_wasm( std::string(wasm_directory) + "store.42.wasm");
229 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
230}
231
232BACKEND_TEST_CASE( "Testing wasm <store_43_wasm>", "[store_43_wasm_tests]" ) {
234 auto code = read_wasm( std::string(wasm_directory) + "store.43.wasm");
235 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
236}
237
238BACKEND_TEST_CASE( "Testing wasm <store_44_wasm>", "[store_44_wasm_tests]" ) {
240 auto code = read_wasm( std::string(wasm_directory) + "store.44.wasm");
241 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
242}
243
244BACKEND_TEST_CASE( "Testing wasm <store_45_wasm>", "[store_45_wasm_tests]" ) {
246 auto code = read_wasm( std::string(wasm_directory) + "store.45.wasm");
247 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
248}
249
250BACKEND_TEST_CASE( "Testing wasm <store_46_wasm>", "[store_46_wasm_tests]" ) {
252 auto code = read_wasm( std::string(wasm_directory) + "store.46.wasm");
253 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
254}
255
256BACKEND_TEST_CASE( "Testing wasm <store_47_wasm>", "[store_47_wasm_tests]" ) {
258 auto code = read_wasm( std::string(wasm_directory) + "store.47.wasm");
259 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
260}
261
262BACKEND_TEST_CASE( "Testing wasm <store_48_wasm>", "[store_48_wasm_tests]" ) {
264 auto code = read_wasm( std::string(wasm_directory) + "store.48.wasm");
265 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
266}
267
268BACKEND_TEST_CASE( "Testing wasm <store_49_wasm>", "[store_49_wasm_tests]" ) {
270 auto code = read_wasm( std::string(wasm_directory) + "store.49.wasm");
271 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
272}
273
274BACKEND_TEST_CASE( "Testing wasm <store_50_wasm>", "[store_50_wasm_tests]" ) {
276 auto code = read_wasm( std::string(wasm_directory) + "store.50.wasm");
277 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
278}
279
280BACKEND_TEST_CASE( "Testing wasm <store_51_wasm>", "[store_51_wasm_tests]" ) {
282 auto code = read_wasm( std::string(wasm_directory) + "store.51.wasm");
283 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
284}
285
286BACKEND_TEST_CASE( "Testing wasm <store_52_wasm>", "[store_52_wasm_tests]" ) {
288 auto code = read_wasm( std::string(wasm_directory) + "store.52.wasm");
289 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
290}
291
292BACKEND_TEST_CASE( "Testing wasm <store_53_wasm>", "[store_53_wasm_tests]" ) {
294 auto code = read_wasm( std::string(wasm_directory) + "store.53.wasm");
295 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
296}
297
298BACKEND_TEST_CASE( "Testing wasm <store_54_wasm>", "[store_54_wasm_tests]" ) {
300 auto code = read_wasm( std::string(wasm_directory) + "store.54.wasm");
301 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
302}
303
304BACKEND_TEST_CASE( "Testing wasm <store_55_wasm>", "[store_55_wasm_tests]" ) {
306 auto code = read_wasm( std::string(wasm_directory) + "store.55.wasm");
307 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
308}
309
310BACKEND_TEST_CASE( "Testing wasm <store_56_wasm>", "[store_56_wasm_tests]" ) {
312 auto code = read_wasm( std::string(wasm_directory) + "store.56.wasm");
313 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
314}
315
316BACKEND_TEST_CASE( "Testing wasm <store_57_wasm>", "[store_57_wasm_tests]" ) {
318 auto code = read_wasm( std::string(wasm_directory) + "store.57.wasm");
319 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
320}
321
322BACKEND_TEST_CASE( "Testing wasm <store_58_wasm>", "[store_58_wasm_tests]" ) {
324 auto code = read_wasm( std::string(wasm_directory) + "store.58.wasm");
325 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
326}
327
328BACKEND_TEST_CASE( "Testing wasm <store_8_wasm>", "[store_8_wasm_tests]" ) {
330 auto code = read_wasm( std::string(wasm_directory) + "store.8.wasm");
331 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
332}
333
334BACKEND_TEST_CASE( "Testing wasm <store_9_wasm>", "[store_9_wasm_tests]" ) {
336 auto code = read_wasm( std::string(wasm_directory) + "store.9.wasm");
337 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
338}
339
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)
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
Definition catch.hpp:203
std::vector< uint8_t > read_wasm(const std::string &fname)
Definition utils.hpp:30
wasm_allocator wa
Definition main.cpp:10
#define BACKEND_TEST_CASE(name, tags)
Definition utils.hpp:59