Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
block_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 <block_0_wasm>", "[block_0_wasm_tests]" ) {
20 auto code = read_wasm( std::string(wasm_directory) + "block.0.wasm");
21 backend_t bkend( code, &wa );
22
23 CHECK(!bkend.call_with_return("env", "empty"));
24 CHECK(bkend.call_with_return("env", "singular")->to_ui32() == UINT32_C(7));
25 CHECK(bkend.call_with_return("env", "multi")->to_ui32() == UINT32_C(8));
26 CHECK(bkend.call_with_return("env", "nested")->to_ui32() == UINT32_C(9));
27 CHECK(bkend.call_with_return("env", "deep")->to_ui32() == UINT32_C(150));
28 CHECK(bkend.call_with_return("env", "as-select-first")->to_ui32() == UINT32_C(1));
29 CHECK(bkend.call_with_return("env", "as-select-mid")->to_ui32() == UINT32_C(2));
30 CHECK(bkend.call_with_return("env", "as-select-last")->to_ui32() == UINT32_C(2));
31 CHECK(bkend.call_with_return("env", "as-loop-first")->to_ui32() == UINT32_C(1));
32 CHECK(bkend.call_with_return("env", "as-loop-mid")->to_ui32() == UINT32_C(1));
33 CHECK(bkend.call_with_return("env", "as-loop-last")->to_ui32() == UINT32_C(1));
34 CHECK(!bkend.call_with_return("env", "as-if-condition"));
35 CHECK(bkend.call_with_return("env", "as-if-then")->to_ui32() == UINT32_C(1));
36 CHECK(bkend.call_with_return("env", "as-if-else")->to_ui32() == UINT32_C(2));
37 CHECK(bkend.call_with_return("env", "as-br_if-first")->to_ui32() == UINT32_C(1));
38 CHECK(bkend.call_with_return("env", "as-br_if-last")->to_ui32() == UINT32_C(2));
39 CHECK(bkend.call_with_return("env", "as-br_table-first")->to_ui32() == UINT32_C(1));
40 CHECK(bkend.call_with_return("env", "as-br_table-last")->to_ui32() == UINT32_C(2));
41 CHECK(bkend.call_with_return("env", "as-call_indirect-first")->to_ui32() == UINT32_C(1));
42 CHECK(bkend.call_with_return("env", "as-call_indirect-mid")->to_ui32() == UINT32_C(2));
43 CHECK(bkend.call_with_return("env", "as-call_indirect-last")->to_ui32() == UINT32_C(1));
44 CHECK(!bkend.call_with_return("env", "as-store-first"));
45 CHECK(!bkend.call_with_return("env", "as-store-last"));
46 CHECK(bkend.call_with_return("env", "as-memory.grow-value")->to_ui32() == UINT32_C(1));
47 CHECK(bkend.call_with_return("env", "as-call-value")->to_ui32() == UINT32_C(1));
48 CHECK(bkend.call_with_return("env", "as-return-value")->to_ui32() == UINT32_C(1));
49 CHECK(!bkend.call_with_return("env", "as-drop-operand"));
50 CHECK(bkend.call_with_return("env", "as-br-value")->to_ui32() == UINT32_C(1));
51 CHECK(bkend.call_with_return("env", "as-local.set-value")->to_ui32() == UINT32_C(1));
52 CHECK(bkend.call_with_return("env", "as-local.tee-value")->to_ui32() == UINT32_C(1));
53 CHECK(bkend.call_with_return("env", "as-global.set-value")->to_ui32() == UINT32_C(1));
54 CHECK(bkend.call_with_return("env", "as-load-operand")->to_ui32() == UINT32_C(1));
55 CHECK(bkend.call_with_return("env", "as-unary-operand")->to_ui32() == UINT32_C(0));
56 CHECK(bkend.call_with_return("env", "as-binary-operand")->to_ui32() == UINT32_C(12));
57 CHECK(bkend.call_with_return("env", "as-test-operand")->to_ui32() == UINT32_C(0));
58 CHECK(bkend.call_with_return("env", "as-compare-operand")->to_ui32() == UINT32_C(0));
59 CHECK(bkend.call_with_return("env", "break-bare")->to_ui32() == UINT32_C(19));
60 CHECK(bkend.call_with_return("env", "break-value")->to_ui32() == UINT32_C(18));
61 CHECK(bkend.call_with_return("env", "break-repeated")->to_ui32() == UINT32_C(18));
62 CHECK(bkend.call_with_return("env", "break-inner")->to_ui32() == UINT32_C(15));
63 CHECK(bkend.call_with_return("env", "effects")->to_ui32() == UINT32_C(1));
64}
65
66BACKEND_TEST_CASE( "Testing wasm <block_1_wasm>", "[block_1_wasm_tests]" ) {
68 auto code = read_wasm( std::string(wasm_directory) + "block.1.wasm");
69 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
70}
71
72BACKEND_TEST_CASE( "Testing wasm <block_10_wasm>", "[block_10_wasm_tests]" ) {
74 auto code = read_wasm( std::string(wasm_directory) + "block.10.wasm");
75 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
76}
77
78BACKEND_TEST_CASE( "Testing wasm <block_100_wasm>", "[block_100_wasm_tests]" ) {
80 auto code = read_wasm( std::string(wasm_directory) + "block.100.wasm");
81 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
82}
83
84BACKEND_TEST_CASE( "Testing wasm <block_101_wasm>", "[block_101_wasm_tests]" ) {
86 auto code = read_wasm( std::string(wasm_directory) + "block.101.wasm");
87 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
88}
89
90BACKEND_TEST_CASE( "Testing wasm <block_102_wasm>", "[block_102_wasm_tests]" ) {
92 auto code = read_wasm( std::string(wasm_directory) + "block.102.wasm");
93 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
94}
95
96BACKEND_TEST_CASE( "Testing wasm <block_103_wasm>", "[block_103_wasm_tests]" ) {
98 auto code = read_wasm( std::string(wasm_directory) + "block.103.wasm");
99 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
100}
101
102BACKEND_TEST_CASE( "Testing wasm <block_104_wasm>", "[block_104_wasm_tests]" ) {
104 auto code = read_wasm( std::string(wasm_directory) + "block.104.wasm");
105 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
106}
107
108BACKEND_TEST_CASE( "Testing wasm <block_105_wasm>", "[block_105_wasm_tests]" ) {
110 auto code = read_wasm( std::string(wasm_directory) + "block.105.wasm");
111 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
112}
113
114BACKEND_TEST_CASE( "Testing wasm <block_106_wasm>", "[block_106_wasm_tests]" ) {
116 auto code = read_wasm( std::string(wasm_directory) + "block.106.wasm");
117 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
118}
119
120BACKEND_TEST_CASE( "Testing wasm <block_107_wasm>", "[block_107_wasm_tests]" ) {
122 auto code = read_wasm( std::string(wasm_directory) + "block.107.wasm");
123 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
124}
125
126BACKEND_TEST_CASE( "Testing wasm <block_108_wasm>", "[block_108_wasm_tests]" ) {
128 auto code = read_wasm( std::string(wasm_directory) + "block.108.wasm");
129 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
130}
131
132BACKEND_TEST_CASE( "Testing wasm <block_109_wasm>", "[block_109_wasm_tests]" ) {
134 auto code = read_wasm( std::string(wasm_directory) + "block.109.wasm");
135 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
136}
137
138BACKEND_TEST_CASE( "Testing wasm <block_11_wasm>", "[block_11_wasm_tests]" ) {
140 auto code = read_wasm( std::string(wasm_directory) + "block.11.wasm");
141 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
142}
143
144BACKEND_TEST_CASE( "Testing wasm <block_110_wasm>", "[block_110_wasm_tests]" ) {
146 auto code = read_wasm( std::string(wasm_directory) + "block.110.wasm");
147 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
148}
149
150BACKEND_TEST_CASE( "Testing wasm <block_111_wasm>", "[block_111_wasm_tests]" ) {
152 auto code = read_wasm( std::string(wasm_directory) + "block.111.wasm");
153 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
154}
155
156BACKEND_TEST_CASE( "Testing wasm <block_112_wasm>", "[block_112_wasm_tests]" ) {
158 auto code = read_wasm( std::string(wasm_directory) + "block.112.wasm");
159 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
160}
161
162BACKEND_TEST_CASE( "Testing wasm <block_113_wasm>", "[block_113_wasm_tests]" ) {
164 auto code = read_wasm( std::string(wasm_directory) + "block.113.wasm");
165 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
166}
167
168BACKEND_TEST_CASE( "Testing wasm <block_114_wasm>", "[block_114_wasm_tests]" ) {
170 auto code = read_wasm( std::string(wasm_directory) + "block.114.wasm");
171 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
172}
173
174BACKEND_TEST_CASE( "Testing wasm <block_115_wasm>", "[block_115_wasm_tests]" ) {
176 auto code = read_wasm( std::string(wasm_directory) + "block.115.wasm");
177 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
178}
179
180BACKEND_TEST_CASE( "Testing wasm <block_116_wasm>", "[block_116_wasm_tests]" ) {
182 auto code = read_wasm( std::string(wasm_directory) + "block.116.wasm");
183 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
184}
185
186BACKEND_TEST_CASE( "Testing wasm <block_117_wasm>", "[block_117_wasm_tests]" ) {
188 auto code = read_wasm( std::string(wasm_directory) + "block.117.wasm");
189 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
190}
191
192BACKEND_TEST_CASE( "Testing wasm <block_118_wasm>", "[block_118_wasm_tests]" ) {
194 auto code = read_wasm( std::string(wasm_directory) + "block.118.wasm");
195 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
196}
197
198BACKEND_TEST_CASE( "Testing wasm <block_119_wasm>", "[block_119_wasm_tests]" ) {
200 auto code = read_wasm( std::string(wasm_directory) + "block.119.wasm");
201 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
202}
203
204BACKEND_TEST_CASE( "Testing wasm <block_12_wasm>", "[block_12_wasm_tests]" ) {
206 auto code = read_wasm( std::string(wasm_directory) + "block.12.wasm");
207 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
208}
209
210BACKEND_TEST_CASE( "Testing wasm <block_120_wasm>", "[block_120_wasm_tests]" ) {
212 auto code = read_wasm( std::string(wasm_directory) + "block.120.wasm");
213 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
214}
215
216BACKEND_TEST_CASE( "Testing wasm <block_121_wasm>", "[block_121_wasm_tests]" ) {
218 auto code = read_wasm( std::string(wasm_directory) + "block.121.wasm");
219 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
220}
221
222BACKEND_TEST_CASE( "Testing wasm <block_122_wasm>", "[block_122_wasm_tests]" ) {
224 auto code = read_wasm( std::string(wasm_directory) + "block.122.wasm");
225 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
226}
227
228BACKEND_TEST_CASE( "Testing wasm <block_123_wasm>", "[block_123_wasm_tests]" ) {
230 auto code = read_wasm( std::string(wasm_directory) + "block.123.wasm");
231 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
232}
233
234BACKEND_TEST_CASE( "Testing wasm <block_124_wasm>", "[block_124_wasm_tests]" ) {
236 auto code = read_wasm( std::string(wasm_directory) + "block.124.wasm");
237 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
238}
239
240BACKEND_TEST_CASE( "Testing wasm <block_125_wasm>", "[block_125_wasm_tests]" ) {
242 auto code = read_wasm( std::string(wasm_directory) + "block.125.wasm");
243 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
244}
245
246BACKEND_TEST_CASE( "Testing wasm <block_126_wasm>", "[block_126_wasm_tests]" ) {
248 auto code = read_wasm( std::string(wasm_directory) + "block.126.wasm");
249 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
250}
251
252BACKEND_TEST_CASE( "Testing wasm <block_127_wasm>", "[block_127_wasm_tests]" ) {
254 auto code = read_wasm( std::string(wasm_directory) + "block.127.wasm");
255 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
256}
257
258BACKEND_TEST_CASE( "Testing wasm <block_13_wasm>", "[block_13_wasm_tests]" ) {
260 auto code = read_wasm( std::string(wasm_directory) + "block.13.wasm");
261 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
262}
263
264BACKEND_TEST_CASE( "Testing wasm <block_14_wasm>", "[block_14_wasm_tests]" ) {
266 auto code = read_wasm( std::string(wasm_directory) + "block.14.wasm");
267 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
268}
269
270BACKEND_TEST_CASE( "Testing wasm <block_15_wasm>", "[block_15_wasm_tests]" ) {
272 auto code = read_wasm( std::string(wasm_directory) + "block.15.wasm");
273 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
274}
275
276BACKEND_TEST_CASE( "Testing wasm <block_16_wasm>", "[block_16_wasm_tests]" ) {
278 auto code = read_wasm( std::string(wasm_directory) + "block.16.wasm");
279 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
280}
281
282BACKEND_TEST_CASE( "Testing wasm <block_17_wasm>", "[block_17_wasm_tests]" ) {
284 auto code = read_wasm( std::string(wasm_directory) + "block.17.wasm");
285 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
286}
287
288BACKEND_TEST_CASE( "Testing wasm <block_18_wasm>", "[block_18_wasm_tests]" ) {
290 auto code = read_wasm( std::string(wasm_directory) + "block.18.wasm");
291 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
292}
293
294BACKEND_TEST_CASE( "Testing wasm <block_19_wasm>", "[block_19_wasm_tests]" ) {
296 auto code = read_wasm( std::string(wasm_directory) + "block.19.wasm");
297 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
298}
299
300BACKEND_TEST_CASE( "Testing wasm <block_2_wasm>", "[block_2_wasm_tests]" ) {
302 auto code = read_wasm( std::string(wasm_directory) + "block.2.wasm");
303 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
304}
305
306BACKEND_TEST_CASE( "Testing wasm <block_20_wasm>", "[block_20_wasm_tests]" ) {
308 auto code = read_wasm( std::string(wasm_directory) + "block.20.wasm");
309 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
310}
311
312BACKEND_TEST_CASE( "Testing wasm <block_21_wasm>", "[block_21_wasm_tests]" ) {
314 auto code = read_wasm( std::string(wasm_directory) + "block.21.wasm");
315 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
316}
317
318BACKEND_TEST_CASE( "Testing wasm <block_22_wasm>", "[block_22_wasm_tests]" ) {
320 auto code = read_wasm( std::string(wasm_directory) + "block.22.wasm");
321 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
322}
323
324BACKEND_TEST_CASE( "Testing wasm <block_23_wasm>", "[block_23_wasm_tests]" ) {
326 auto code = read_wasm( std::string(wasm_directory) + "block.23.wasm");
327 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
328}
329
330BACKEND_TEST_CASE( "Testing wasm <block_24_wasm>", "[block_24_wasm_tests]" ) {
332 auto code = read_wasm( std::string(wasm_directory) + "block.24.wasm");
333 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
334}
335
336BACKEND_TEST_CASE( "Testing wasm <block_25_wasm>", "[block_25_wasm_tests]" ) {
338 auto code = read_wasm( std::string(wasm_directory) + "block.25.wasm");
339 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
340}
341
342BACKEND_TEST_CASE( "Testing wasm <block_26_wasm>", "[block_26_wasm_tests]" ) {
344 auto code = read_wasm( std::string(wasm_directory) + "block.26.wasm");
345 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
346}
347
348BACKEND_TEST_CASE( "Testing wasm <block_27_wasm>", "[block_27_wasm_tests]" ) {
350 auto code = read_wasm( std::string(wasm_directory) + "block.27.wasm");
351 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
352}
353
354BACKEND_TEST_CASE( "Testing wasm <block_28_wasm>", "[block_28_wasm_tests]" ) {
356 auto code = read_wasm( std::string(wasm_directory) + "block.28.wasm");
357 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
358}
359
360BACKEND_TEST_CASE( "Testing wasm <block_29_wasm>", "[block_29_wasm_tests]" ) {
362 auto code = read_wasm( std::string(wasm_directory) + "block.29.wasm");
363 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
364}
365
366BACKEND_TEST_CASE( "Testing wasm <block_3_wasm>", "[block_3_wasm_tests]" ) {
368 auto code = read_wasm( std::string(wasm_directory) + "block.3.wasm");
369 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
370}
371
372BACKEND_TEST_CASE( "Testing wasm <block_30_wasm>", "[block_30_wasm_tests]" ) {
374 auto code = read_wasm( std::string(wasm_directory) + "block.30.wasm");
375 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
376}
377
378BACKEND_TEST_CASE( "Testing wasm <block_31_wasm>", "[block_31_wasm_tests]" ) {
380 auto code = read_wasm( std::string(wasm_directory) + "block.31.wasm");
381 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
382}
383
384BACKEND_TEST_CASE( "Testing wasm <block_32_wasm>", "[block_32_wasm_tests]" ) {
386 auto code = read_wasm( std::string(wasm_directory) + "block.32.wasm");
387 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
388}
389
390BACKEND_TEST_CASE( "Testing wasm <block_33_wasm>", "[block_33_wasm_tests]" ) {
392 auto code = read_wasm( std::string(wasm_directory) + "block.33.wasm");
393 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
394}
395
396BACKEND_TEST_CASE( "Testing wasm <block_34_wasm>", "[block_34_wasm_tests]" ) {
398 auto code = read_wasm( std::string(wasm_directory) + "block.34.wasm");
399 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
400}
401
402BACKEND_TEST_CASE( "Testing wasm <block_35_wasm>", "[block_35_wasm_tests]" ) {
404 auto code = read_wasm( std::string(wasm_directory) + "block.35.wasm");
405 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
406}
407
408BACKEND_TEST_CASE( "Testing wasm <block_36_wasm>", "[block_36_wasm_tests]" ) {
410 auto code = read_wasm( std::string(wasm_directory) + "block.36.wasm");
411 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
412}
413
414BACKEND_TEST_CASE( "Testing wasm <block_37_wasm>", "[block_37_wasm_tests]" ) {
416 auto code = read_wasm( std::string(wasm_directory) + "block.37.wasm");
417 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
418}
419
420BACKEND_TEST_CASE( "Testing wasm <block_38_wasm>", "[block_38_wasm_tests]" ) {
422 auto code = read_wasm( std::string(wasm_directory) + "block.38.wasm");
423 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
424}
425
426BACKEND_TEST_CASE( "Testing wasm <block_39_wasm>", "[block_39_wasm_tests]" ) {
428 auto code = read_wasm( std::string(wasm_directory) + "block.39.wasm");
429 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
430}
431
432BACKEND_TEST_CASE( "Testing wasm <block_4_wasm>", "[block_4_wasm_tests]" ) {
434 auto code = read_wasm( std::string(wasm_directory) + "block.4.wasm");
435 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
436}
437
438BACKEND_TEST_CASE( "Testing wasm <block_40_wasm>", "[block_40_wasm_tests]" ) {
440 auto code = read_wasm( std::string(wasm_directory) + "block.40.wasm");
441 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
442}
443
444BACKEND_TEST_CASE( "Testing wasm <block_41_wasm>", "[block_41_wasm_tests]" ) {
446 auto code = read_wasm( std::string(wasm_directory) + "block.41.wasm");
447 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
448}
449
450BACKEND_TEST_CASE( "Testing wasm <block_42_wasm>", "[block_42_wasm_tests]" ) {
452 auto code = read_wasm( std::string(wasm_directory) + "block.42.wasm");
453 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
454}
455
456BACKEND_TEST_CASE( "Testing wasm <block_43_wasm>", "[block_43_wasm_tests]" ) {
458 auto code = read_wasm( std::string(wasm_directory) + "block.43.wasm");
459 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
460}
461
462BACKEND_TEST_CASE( "Testing wasm <block_44_wasm>", "[block_44_wasm_tests]" ) {
464 auto code = read_wasm( std::string(wasm_directory) + "block.44.wasm");
465 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
466}
467
468BACKEND_TEST_CASE( "Testing wasm <block_45_wasm>", "[block_45_wasm_tests]" ) {
470 auto code = read_wasm( std::string(wasm_directory) + "block.45.wasm");
471 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
472}
473
474BACKEND_TEST_CASE( "Testing wasm <block_46_wasm>", "[block_46_wasm_tests]" ) {
476 auto code = read_wasm( std::string(wasm_directory) + "block.46.wasm");
477 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
478}
479
480BACKEND_TEST_CASE( "Testing wasm <block_47_wasm>", "[block_47_wasm_tests]" ) {
482 auto code = read_wasm( std::string(wasm_directory) + "block.47.wasm");
483 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
484}
485
486BACKEND_TEST_CASE( "Testing wasm <block_48_wasm>", "[block_48_wasm_tests]" ) {
488 auto code = read_wasm( std::string(wasm_directory) + "block.48.wasm");
489 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
490}
491
492BACKEND_TEST_CASE( "Testing wasm <block_49_wasm>", "[block_49_wasm_tests]" ) {
494 auto code = read_wasm( std::string(wasm_directory) + "block.49.wasm");
495 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
496}
497
498BACKEND_TEST_CASE( "Testing wasm <block_5_wasm>", "[block_5_wasm_tests]" ) {
500 auto code = read_wasm( std::string(wasm_directory) + "block.5.wasm");
501 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
502}
503
504BACKEND_TEST_CASE( "Testing wasm <block_50_wasm>", "[block_50_wasm_tests]" ) {
506 auto code = read_wasm( std::string(wasm_directory) + "block.50.wasm");
507 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
508}
509
510BACKEND_TEST_CASE( "Testing wasm <block_51_wasm>", "[block_51_wasm_tests]" ) {
512 auto code = read_wasm( std::string(wasm_directory) + "block.51.wasm");
513 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
514}
515
516BACKEND_TEST_CASE( "Testing wasm <block_52_wasm>", "[block_52_wasm_tests]" ) {
518 auto code = read_wasm( std::string(wasm_directory) + "block.52.wasm");
519 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
520}
521
522BACKEND_TEST_CASE( "Testing wasm <block_53_wasm>", "[block_53_wasm_tests]" ) {
524 auto code = read_wasm( std::string(wasm_directory) + "block.53.wasm");
525 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
526}
527
528BACKEND_TEST_CASE( "Testing wasm <block_54_wasm>", "[block_54_wasm_tests]" ) {
530 auto code = read_wasm( std::string(wasm_directory) + "block.54.wasm");
531 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
532}
533
534BACKEND_TEST_CASE( "Testing wasm <block_55_wasm>", "[block_55_wasm_tests]" ) {
536 auto code = read_wasm( std::string(wasm_directory) + "block.55.wasm");
537 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
538}
539
540BACKEND_TEST_CASE( "Testing wasm <block_56_wasm>", "[block_56_wasm_tests]" ) {
542 auto code = read_wasm( std::string(wasm_directory) + "block.56.wasm");
543 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
544}
545
546BACKEND_TEST_CASE( "Testing wasm <block_57_wasm>", "[block_57_wasm_tests]" ) {
548 auto code = read_wasm( std::string(wasm_directory) + "block.57.wasm");
549 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
550}
551
552BACKEND_TEST_CASE( "Testing wasm <block_58_wasm>", "[block_58_wasm_tests]" ) {
554 auto code = read_wasm( std::string(wasm_directory) + "block.58.wasm");
555 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
556}
557
558BACKEND_TEST_CASE( "Testing wasm <block_59_wasm>", "[block_59_wasm_tests]" ) {
560 auto code = read_wasm( std::string(wasm_directory) + "block.59.wasm");
561 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
562}
563
564BACKEND_TEST_CASE( "Testing wasm <block_6_wasm>", "[block_6_wasm_tests]" ) {
566 auto code = read_wasm( std::string(wasm_directory) + "block.6.wasm");
567 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
568}
569
570BACKEND_TEST_CASE( "Testing wasm <block_60_wasm>", "[block_60_wasm_tests]" ) {
572 auto code = read_wasm( std::string(wasm_directory) + "block.60.wasm");
573 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
574}
575
576BACKEND_TEST_CASE( "Testing wasm <block_61_wasm>", "[block_61_wasm_tests]" ) {
578 auto code = read_wasm( std::string(wasm_directory) + "block.61.wasm");
579 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
580}
581
582BACKEND_TEST_CASE( "Testing wasm <block_62_wasm>", "[block_62_wasm_tests]" ) {
584 auto code = read_wasm( std::string(wasm_directory) + "block.62.wasm");
585 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
586}
587
588BACKEND_TEST_CASE( "Testing wasm <block_63_wasm>", "[block_63_wasm_tests]" ) {
590 auto code = read_wasm( std::string(wasm_directory) + "block.63.wasm");
591 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
592}
593
594BACKEND_TEST_CASE( "Testing wasm <block_64_wasm>", "[block_64_wasm_tests]" ) {
596 auto code = read_wasm( std::string(wasm_directory) + "block.64.wasm");
597 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
598}
599
600BACKEND_TEST_CASE( "Testing wasm <block_65_wasm>", "[block_65_wasm_tests]" ) {
602 auto code = read_wasm( std::string(wasm_directory) + "block.65.wasm");
603 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
604}
605
606BACKEND_TEST_CASE( "Testing wasm <block_66_wasm>", "[block_66_wasm_tests]" ) {
608 auto code = read_wasm( std::string(wasm_directory) + "block.66.wasm");
609 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
610}
611
612BACKEND_TEST_CASE( "Testing wasm <block_67_wasm>", "[block_67_wasm_tests]" ) {
614 auto code = read_wasm( std::string(wasm_directory) + "block.67.wasm");
615 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
616}
617
618BACKEND_TEST_CASE( "Testing wasm <block_68_wasm>", "[block_68_wasm_tests]" ) {
620 auto code = read_wasm( std::string(wasm_directory) + "block.68.wasm");
621 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
622}
623
624BACKEND_TEST_CASE( "Testing wasm <block_69_wasm>", "[block_69_wasm_tests]" ) {
626 auto code = read_wasm( std::string(wasm_directory) + "block.69.wasm");
627 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
628}
629
630BACKEND_TEST_CASE( "Testing wasm <block_7_wasm>", "[block_7_wasm_tests]" ) {
632 auto code = read_wasm( std::string(wasm_directory) + "block.7.wasm");
633 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
634}
635
636BACKEND_TEST_CASE( "Testing wasm <block_70_wasm>", "[block_70_wasm_tests]" ) {
638 auto code = read_wasm( std::string(wasm_directory) + "block.70.wasm");
639 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
640}
641
642BACKEND_TEST_CASE( "Testing wasm <block_71_wasm>", "[block_71_wasm_tests]" ) {
644 auto code = read_wasm( std::string(wasm_directory) + "block.71.wasm");
645 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
646}
647
648BACKEND_TEST_CASE( "Testing wasm <block_72_wasm>", "[block_72_wasm_tests]" ) {
650 auto code = read_wasm( std::string(wasm_directory) + "block.72.wasm");
651 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
652}
653
654BACKEND_TEST_CASE( "Testing wasm <block_73_wasm>", "[block_73_wasm_tests]" ) {
656 auto code = read_wasm( std::string(wasm_directory) + "block.73.wasm");
657 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
658}
659
660BACKEND_TEST_CASE( "Testing wasm <block_74_wasm>", "[block_74_wasm_tests]" ) {
662 auto code = read_wasm( std::string(wasm_directory) + "block.74.wasm");
663 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
664}
665
666BACKEND_TEST_CASE( "Testing wasm <block_75_wasm>", "[block_75_wasm_tests]" ) {
668 auto code = read_wasm( std::string(wasm_directory) + "block.75.wasm");
669 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
670}
671
672BACKEND_TEST_CASE( "Testing wasm <block_76_wasm>", "[block_76_wasm_tests]" ) {
674 auto code = read_wasm( std::string(wasm_directory) + "block.76.wasm");
675 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
676}
677
678BACKEND_TEST_CASE( "Testing wasm <block_77_wasm>", "[block_77_wasm_tests]" ) {
680 auto code = read_wasm( std::string(wasm_directory) + "block.77.wasm");
681 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
682}
683
684BACKEND_TEST_CASE( "Testing wasm <block_78_wasm>", "[block_78_wasm_tests]" ) {
686 auto code = read_wasm( std::string(wasm_directory) + "block.78.wasm");
687 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
688}
689
690BACKEND_TEST_CASE( "Testing wasm <block_79_wasm>", "[block_79_wasm_tests]" ) {
692 auto code = read_wasm( std::string(wasm_directory) + "block.79.wasm");
693 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
694}
695
696BACKEND_TEST_CASE( "Testing wasm <block_8_wasm>", "[block_8_wasm_tests]" ) {
698 auto code = read_wasm( std::string(wasm_directory) + "block.8.wasm");
699 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
700}
701
702BACKEND_TEST_CASE( "Testing wasm <block_80_wasm>", "[block_80_wasm_tests]" ) {
704 auto code = read_wasm( std::string(wasm_directory) + "block.80.wasm");
705 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
706}
707
708BACKEND_TEST_CASE( "Testing wasm <block_81_wasm>", "[block_81_wasm_tests]" ) {
710 auto code = read_wasm( std::string(wasm_directory) + "block.81.wasm");
711 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
712}
713
714BACKEND_TEST_CASE( "Testing wasm <block_82_wasm>", "[block_82_wasm_tests]" ) {
716 auto code = read_wasm( std::string(wasm_directory) + "block.82.wasm");
717 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
718}
719
720BACKEND_TEST_CASE( "Testing wasm <block_83_wasm>", "[block_83_wasm_tests]" ) {
722 auto code = read_wasm( std::string(wasm_directory) + "block.83.wasm");
723 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
724}
725
726BACKEND_TEST_CASE( "Testing wasm <block_84_wasm>", "[block_84_wasm_tests]" ) {
728 auto code = read_wasm( std::string(wasm_directory) + "block.84.wasm");
729 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
730}
731
732BACKEND_TEST_CASE( "Testing wasm <block_85_wasm>", "[block_85_wasm_tests]" ) {
734 auto code = read_wasm( std::string(wasm_directory) + "block.85.wasm");
735 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
736}
737
738BACKEND_TEST_CASE( "Testing wasm <block_86_wasm>", "[block_86_wasm_tests]" ) {
740 auto code = read_wasm( std::string(wasm_directory) + "block.86.wasm");
741 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
742}
743
744BACKEND_TEST_CASE( "Testing wasm <block_87_wasm>", "[block_87_wasm_tests]" ) {
746 auto code = read_wasm( std::string(wasm_directory) + "block.87.wasm");
747 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
748}
749
750BACKEND_TEST_CASE( "Testing wasm <block_88_wasm>", "[block_88_wasm_tests]" ) {
752 auto code = read_wasm( std::string(wasm_directory) + "block.88.wasm");
753 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
754}
755
756BACKEND_TEST_CASE( "Testing wasm <block_89_wasm>", "[block_89_wasm_tests]" ) {
758 auto code = read_wasm( std::string(wasm_directory) + "block.89.wasm");
759 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
760}
761
762BACKEND_TEST_CASE( "Testing wasm <block_9_wasm>", "[block_9_wasm_tests]" ) {
764 auto code = read_wasm( std::string(wasm_directory) + "block.9.wasm");
765 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
766}
767
768BACKEND_TEST_CASE( "Testing wasm <block_90_wasm>", "[block_90_wasm_tests]" ) {
770 auto code = read_wasm( std::string(wasm_directory) + "block.90.wasm");
771 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
772}
773
774BACKEND_TEST_CASE( "Testing wasm <block_91_wasm>", "[block_91_wasm_tests]" ) {
776 auto code = read_wasm( std::string(wasm_directory) + "block.91.wasm");
777 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
778}
779
780BACKEND_TEST_CASE( "Testing wasm <block_92_wasm>", "[block_92_wasm_tests]" ) {
782 auto code = read_wasm( std::string(wasm_directory) + "block.92.wasm");
783 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
784}
785
786BACKEND_TEST_CASE( "Testing wasm <block_93_wasm>", "[block_93_wasm_tests]" ) {
788 auto code = read_wasm( std::string(wasm_directory) + "block.93.wasm");
789 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
790}
791
792BACKEND_TEST_CASE( "Testing wasm <block_94_wasm>", "[block_94_wasm_tests]" ) {
794 auto code = read_wasm( std::string(wasm_directory) + "block.94.wasm");
795 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
796}
797
798BACKEND_TEST_CASE( "Testing wasm <block_95_wasm>", "[block_95_wasm_tests]" ) {
800 auto code = read_wasm( std::string(wasm_directory) + "block.95.wasm");
801 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
802}
803
804BACKEND_TEST_CASE( "Testing wasm <block_96_wasm>", "[block_96_wasm_tests]" ) {
806 auto code = read_wasm( std::string(wasm_directory) + "block.96.wasm");
807 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
808}
809
810BACKEND_TEST_CASE( "Testing wasm <block_97_wasm>", "[block_97_wasm_tests]" ) {
812 auto code = read_wasm( std::string(wasm_directory) + "block.97.wasm");
813 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
814}
815
816BACKEND_TEST_CASE( "Testing wasm <block_98_wasm>", "[block_98_wasm_tests]" ) {
818 auto code = read_wasm( std::string(wasm_directory) + "block.98.wasm");
819 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
820}
821
822BACKEND_TEST_CASE( "Testing wasm <block_99_wasm>", "[block_99_wasm_tests]" ) {
824 auto code = read_wasm( std::string(wasm_directory) + "block.99.wasm");
825 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
826}
827
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)
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
#define UINT32_C(val)
Definition stdint.h:283
#define BACKEND_TEST_CASE(name, tags)
Definition utils.hpp:59