Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
align_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 <align_0_wasm>", "[align_0_wasm_tests]" ) {
20 auto code = read_wasm( std::string(wasm_directory) + "align.0.wasm");
21 backend_t bkend( code, &wa );
22
23}
24
25BACKEND_TEST_CASE( "Testing wasm <align_1_wasm>", "[align_1_wasm_tests]" ) {
27 auto code = read_wasm( std::string(wasm_directory) + "align.1.wasm");
28 backend_t bkend( code, &wa );
29
30}
31
32BACKEND_TEST_CASE( "Testing wasm <align_10_wasm>", "[align_10_wasm_tests]" ) {
34 auto code = read_wasm( std::string(wasm_directory) + "align.10.wasm");
35 backend_t bkend( code, &wa );
36
37}
38
39BACKEND_TEST_CASE( "Testing wasm <align_100_wasm>", "[align_100_wasm_tests]" ) {
41 auto code = read_wasm( std::string(wasm_directory) + "align.100.wasm");
42 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
43}
44
45BACKEND_TEST_CASE( "Testing wasm <align_101_wasm>", "[align_101_wasm_tests]" ) {
47 auto code = read_wasm( std::string(wasm_directory) + "align.101.wasm");
48 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
49}
50
51BACKEND_TEST_CASE( "Testing wasm <align_102_wasm>", "[align_102_wasm_tests]" ) {
53 auto code = read_wasm( std::string(wasm_directory) + "align.102.wasm");
54 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
55}
56
57BACKEND_TEST_CASE( "Testing wasm <align_103_wasm>", "[align_103_wasm_tests]" ) {
59 auto code = read_wasm( std::string(wasm_directory) + "align.103.wasm");
60 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
61}
62
63BACKEND_TEST_CASE( "Testing wasm <align_104_wasm>", "[align_104_wasm_tests]" ) {
65 auto code = read_wasm( std::string(wasm_directory) + "align.104.wasm");
66 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
67}
68
69BACKEND_TEST_CASE( "Testing wasm <align_105_wasm>", "[align_105_wasm_tests]" ) {
71 auto code = read_wasm( std::string(wasm_directory) + "align.105.wasm");
72 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
73}
74
75BACKEND_TEST_CASE( "Testing wasm <align_106_wasm>", "[align_106_wasm_tests]" ) {
77 auto code = read_wasm( std::string(wasm_directory) + "align.106.wasm");
78 backend_t bkend( code, &wa );
79
80 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32_align_switch", UINT32_C(0))->to_f32()) == UINT32_C(1092616192));
81 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32_align_switch", UINT32_C(1))->to_f32()) == UINT32_C(1092616192));
82 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32_align_switch", UINT32_C(2))->to_f32()) == UINT32_C(1092616192));
83 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32_align_switch", UINT32_C(3))->to_f32()) == UINT32_C(1092616192));
84 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64_align_switch", UINT32_C(0))->to_f64()) == UINT64_C(4621819117588971520));
85 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64_align_switch", UINT32_C(1))->to_f64()) == UINT64_C(4621819117588971520));
86 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64_align_switch", UINT32_C(2))->to_f64()) == UINT64_C(4621819117588971520));
87 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64_align_switch", UINT32_C(3))->to_f64()) == UINT64_C(4621819117588971520));
88 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64_align_switch", UINT32_C(4))->to_f64()) == UINT64_C(4621819117588971520));
89 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(10));
90 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(10));
91 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(10));
92 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(10));
93 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(2), UINT32_C(0))->to_ui32() == UINT32_C(10));
94 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(2), UINT32_C(1))->to_ui32() == UINT32_C(10));
95 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(2), UINT32_C(2))->to_ui32() == UINT32_C(10));
96 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(3), UINT32_C(0))->to_ui32() == UINT32_C(10));
97 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(3), UINT32_C(1))->to_ui32() == UINT32_C(10));
98 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(3), UINT32_C(2))->to_ui32() == UINT32_C(10));
99 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(4), UINT32_C(0))->to_ui32() == UINT32_C(10));
100 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(4), UINT32_C(1))->to_ui32() == UINT32_C(10));
101 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(4), UINT32_C(2))->to_ui32() == UINT32_C(10));
102 CHECK(bkend.call_with_return("env", "i32_align_switch", UINT32_C(4), UINT32_C(4))->to_ui32() == UINT32_C(10));
103 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(0), UINT32_C(0))->to_ui64() == UINT32_C(10));
104 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(0), UINT32_C(1))->to_ui64() == UINT32_C(10));
105 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(1), UINT32_C(0))->to_ui64() == UINT32_C(10));
106 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(1), UINT32_C(1))->to_ui64() == UINT32_C(10));
107 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(2), UINT32_C(0))->to_ui64() == UINT32_C(10));
108 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(2), UINT32_C(1))->to_ui64() == UINT32_C(10));
109 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(2), UINT32_C(2))->to_ui64() == UINT32_C(10));
110 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(3), UINT32_C(0))->to_ui64() == UINT32_C(10));
111 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(3), UINT32_C(1))->to_ui64() == UINT32_C(10));
112 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(3), UINT32_C(2))->to_ui64() == UINT32_C(10));
113 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(4), UINT32_C(0))->to_ui64() == UINT32_C(10));
114 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(4), UINT32_C(1))->to_ui64() == UINT32_C(10));
115 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(4), UINT32_C(2))->to_ui64() == UINT32_C(10));
116 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(4), UINT32_C(4))->to_ui64() == UINT32_C(10));
117 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(5), UINT32_C(0))->to_ui64() == UINT32_C(10));
118 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(5), UINT32_C(1))->to_ui64() == UINT32_C(10));
119 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(5), UINT32_C(2))->to_ui64() == UINT32_C(10));
120 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(5), UINT32_C(4))->to_ui64() == UINT32_C(10));
121 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(6), UINT32_C(0))->to_ui64() == UINT32_C(10));
122 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(6), UINT32_C(1))->to_ui64() == UINT32_C(10));
123 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(6), UINT32_C(2))->to_ui64() == UINT32_C(10));
124 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(6), UINT32_C(4))->to_ui64() == UINT32_C(10));
125 CHECK(bkend.call_with_return("env", "i64_align_switch", UINT32_C(6), UINT32_C(8))->to_ui64() == UINT32_C(10));
126}
127
128BACKEND_TEST_CASE( "Testing wasm <align_107_wasm>", "[align_107_wasm_tests]" ) {
130 auto code = read_wasm( std::string(wasm_directory) + "align.107.wasm");
131 backend_t bkend( code, &wa );
132
133 CHECK_THROWS_AS(bkend("env", "store", UINT32_C(65532), UINT64_C(18446744073709551615)), std::exception);
134 CHECK(bkend.call_with_return("env", "load", UINT32_C(65532))->to_ui32() == UINT32_C(0));
135}
136
137BACKEND_TEST_CASE( "Testing wasm <align_11_wasm>", "[align_11_wasm_tests]" ) {
139 auto code = read_wasm( std::string(wasm_directory) + "align.11.wasm");
140 backend_t bkend( code, &wa );
141
142}
143
144BACKEND_TEST_CASE( "Testing wasm <align_12_wasm>", "[align_12_wasm_tests]" ) {
146 auto code = read_wasm( std::string(wasm_directory) + "align.12.wasm");
147 backend_t bkend( code, &wa );
148
149}
150
151BACKEND_TEST_CASE( "Testing wasm <align_13_wasm>", "[align_13_wasm_tests]" ) {
153 auto code = read_wasm( std::string(wasm_directory) + "align.13.wasm");
154 backend_t bkend( code, &wa );
155
156}
157
158BACKEND_TEST_CASE( "Testing wasm <align_14_wasm>", "[align_14_wasm_tests]" ) {
160 auto code = read_wasm( std::string(wasm_directory) + "align.14.wasm");
161 backend_t bkend( code, &wa );
162
163}
164
165BACKEND_TEST_CASE( "Testing wasm <align_15_wasm>", "[align_15_wasm_tests]" ) {
167 auto code = read_wasm( std::string(wasm_directory) + "align.15.wasm");
168 backend_t bkend( code, &wa );
169
170}
171
172BACKEND_TEST_CASE( "Testing wasm <align_16_wasm>", "[align_16_wasm_tests]" ) {
174 auto code = read_wasm( std::string(wasm_directory) + "align.16.wasm");
175 backend_t bkend( code, &wa );
176
177}
178
179BACKEND_TEST_CASE( "Testing wasm <align_17_wasm>", "[align_17_wasm_tests]" ) {
181 auto code = read_wasm( std::string(wasm_directory) + "align.17.wasm");
182 backend_t bkend( code, &wa );
183
184}
185
186BACKEND_TEST_CASE( "Testing wasm <align_18_wasm>", "[align_18_wasm_tests]" ) {
188 auto code = read_wasm( std::string(wasm_directory) + "align.18.wasm");
189 backend_t bkend( code, &wa );
190
191}
192
193BACKEND_TEST_CASE( "Testing wasm <align_19_wasm>", "[align_19_wasm_tests]" ) {
195 auto code = read_wasm( std::string(wasm_directory) + "align.19.wasm");
196 backend_t bkend( code, &wa );
197
198}
199
200BACKEND_TEST_CASE( "Testing wasm <align_2_wasm>", "[align_2_wasm_tests]" ) {
202 auto code = read_wasm( std::string(wasm_directory) + "align.2.wasm");
203 backend_t bkend( code, &wa );
204
205}
206
207BACKEND_TEST_CASE( "Testing wasm <align_20_wasm>", "[align_20_wasm_tests]" ) {
209 auto code = read_wasm( std::string(wasm_directory) + "align.20.wasm");
210 backend_t bkend( code, &wa );
211
212}
213
214BACKEND_TEST_CASE( "Testing wasm <align_21_wasm>", "[align_21_wasm_tests]" ) {
216 auto code = read_wasm( std::string(wasm_directory) + "align.21.wasm");
217 backend_t bkend( code, &wa );
218
219}
220
221BACKEND_TEST_CASE( "Testing wasm <align_22_wasm>", "[align_22_wasm_tests]" ) {
223 auto code = read_wasm( std::string(wasm_directory) + "align.22.wasm");
224 backend_t bkend( code, &wa );
225
226}
227
228BACKEND_TEST_CASE( "Testing wasm <align_3_wasm>", "[align_3_wasm_tests]" ) {
230 auto code = read_wasm( std::string(wasm_directory) + "align.3.wasm");
231 backend_t bkend( code, &wa );
232
233}
234
235BACKEND_TEST_CASE( "Testing wasm <align_4_wasm>", "[align_4_wasm_tests]" ) {
237 auto code = read_wasm( std::string(wasm_directory) + "align.4.wasm");
238 backend_t bkend( code, &wa );
239
240}
241
242BACKEND_TEST_CASE( "Testing wasm <align_5_wasm>", "[align_5_wasm_tests]" ) {
244 auto code = read_wasm( std::string(wasm_directory) + "align.5.wasm");
245 backend_t bkend( code, &wa );
246
247}
248
249BACKEND_TEST_CASE( "Testing wasm <align_6_wasm>", "[align_6_wasm_tests]" ) {
251 auto code = read_wasm( std::string(wasm_directory) + "align.6.wasm");
252 backend_t bkend( code, &wa );
253
254}
255
256BACKEND_TEST_CASE( "Testing wasm <align_69_wasm>", "[align_69_wasm_tests]" ) {
258 auto code = read_wasm( std::string(wasm_directory) + "align.69.wasm");
259 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
260}
261
262BACKEND_TEST_CASE( "Testing wasm <align_7_wasm>", "[align_7_wasm_tests]" ) {
264 auto code = read_wasm( std::string(wasm_directory) + "align.7.wasm");
265 backend_t bkend( code, &wa );
266
267}
268
269BACKEND_TEST_CASE( "Testing wasm <align_70_wasm>", "[align_70_wasm_tests]" ) {
271 auto code = read_wasm( std::string(wasm_directory) + "align.70.wasm");
272 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
273}
274
275BACKEND_TEST_CASE( "Testing wasm <align_71_wasm>", "[align_71_wasm_tests]" ) {
277 auto code = read_wasm( std::string(wasm_directory) + "align.71.wasm");
278 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
279}
280
281BACKEND_TEST_CASE( "Testing wasm <align_72_wasm>", "[align_72_wasm_tests]" ) {
283 auto code = read_wasm( std::string(wasm_directory) + "align.72.wasm");
284 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
285}
286
287BACKEND_TEST_CASE( "Testing wasm <align_73_wasm>", "[align_73_wasm_tests]" ) {
289 auto code = read_wasm( std::string(wasm_directory) + "align.73.wasm");
290 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
291}
292
293BACKEND_TEST_CASE( "Testing wasm <align_74_wasm>", "[align_74_wasm_tests]" ) {
295 auto code = read_wasm( std::string(wasm_directory) + "align.74.wasm");
296 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
297}
298
299BACKEND_TEST_CASE( "Testing wasm <align_75_wasm>", "[align_75_wasm_tests]" ) {
301 auto code = read_wasm( std::string(wasm_directory) + "align.75.wasm");
302 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
303}
304
305BACKEND_TEST_CASE( "Testing wasm <align_76_wasm>", "[align_76_wasm_tests]" ) {
307 auto code = read_wasm( std::string(wasm_directory) + "align.76.wasm");
308 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
309}
310
311BACKEND_TEST_CASE( "Testing wasm <align_77_wasm>", "[align_77_wasm_tests]" ) {
313 auto code = read_wasm( std::string(wasm_directory) + "align.77.wasm");
314 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
315}
316
317BACKEND_TEST_CASE( "Testing wasm <align_78_wasm>", "[align_78_wasm_tests]" ) {
319 auto code = read_wasm( std::string(wasm_directory) + "align.78.wasm");
320 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
321}
322
323BACKEND_TEST_CASE( "Testing wasm <align_79_wasm>", "[align_79_wasm_tests]" ) {
325 auto code = read_wasm( std::string(wasm_directory) + "align.79.wasm");
326 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
327}
328
329BACKEND_TEST_CASE( "Testing wasm <align_8_wasm>", "[align_8_wasm_tests]" ) {
331 auto code = read_wasm( std::string(wasm_directory) + "align.8.wasm");
332 backend_t bkend( code, &wa );
333
334}
335
336BACKEND_TEST_CASE( "Testing wasm <align_80_wasm>", "[align_80_wasm_tests]" ) {
338 auto code = read_wasm( std::string(wasm_directory) + "align.80.wasm");
339 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
340}
341
342BACKEND_TEST_CASE( "Testing wasm <align_81_wasm>", "[align_81_wasm_tests]" ) {
344 auto code = read_wasm( std::string(wasm_directory) + "align.81.wasm");
345 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
346}
347
348BACKEND_TEST_CASE( "Testing wasm <align_82_wasm>", "[align_82_wasm_tests]" ) {
350 auto code = read_wasm( std::string(wasm_directory) + "align.82.wasm");
351 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
352}
353
354BACKEND_TEST_CASE( "Testing wasm <align_83_wasm>", "[align_83_wasm_tests]" ) {
356 auto code = read_wasm( std::string(wasm_directory) + "align.83.wasm");
357 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
358}
359
360BACKEND_TEST_CASE( "Testing wasm <align_84_wasm>", "[align_84_wasm_tests]" ) {
362 auto code = read_wasm( std::string(wasm_directory) + "align.84.wasm");
363 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
364}
365
366BACKEND_TEST_CASE( "Testing wasm <align_85_wasm>", "[align_85_wasm_tests]" ) {
368 auto code = read_wasm( std::string(wasm_directory) + "align.85.wasm");
369 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
370}
371
372BACKEND_TEST_CASE( "Testing wasm <align_86_wasm>", "[align_86_wasm_tests]" ) {
374 auto code = read_wasm( std::string(wasm_directory) + "align.86.wasm");
375 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
376}
377
378BACKEND_TEST_CASE( "Testing wasm <align_87_wasm>", "[align_87_wasm_tests]" ) {
380 auto code = read_wasm( std::string(wasm_directory) + "align.87.wasm");
381 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
382}
383
384BACKEND_TEST_CASE( "Testing wasm <align_88_wasm>", "[align_88_wasm_tests]" ) {
386 auto code = read_wasm( std::string(wasm_directory) + "align.88.wasm");
387 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
388}
389
390BACKEND_TEST_CASE( "Testing wasm <align_89_wasm>", "[align_89_wasm_tests]" ) {
392 auto code = read_wasm( std::string(wasm_directory) + "align.89.wasm");
393 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
394}
395
396BACKEND_TEST_CASE( "Testing wasm <align_9_wasm>", "[align_9_wasm_tests]" ) {
398 auto code = read_wasm( std::string(wasm_directory) + "align.9.wasm");
399 backend_t bkend( code, &wa );
400
401}
402
403BACKEND_TEST_CASE( "Testing wasm <align_90_wasm>", "[align_90_wasm_tests]" ) {
405 auto code = read_wasm( std::string(wasm_directory) + "align.90.wasm");
406 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
407}
408
409BACKEND_TEST_CASE( "Testing wasm <align_91_wasm>", "[align_91_wasm_tests]" ) {
411 auto code = read_wasm( std::string(wasm_directory) + "align.91.wasm");
412 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
413}
414
415BACKEND_TEST_CASE( "Testing wasm <align_92_wasm>", "[align_92_wasm_tests]" ) {
417 auto code = read_wasm( std::string(wasm_directory) + "align.92.wasm");
418 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
419}
420
421BACKEND_TEST_CASE( "Testing wasm <align_93_wasm>", "[align_93_wasm_tests]" ) {
423 auto code = read_wasm( std::string(wasm_directory) + "align.93.wasm");
424 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
425}
426
427BACKEND_TEST_CASE( "Testing wasm <align_94_wasm>", "[align_94_wasm_tests]" ) {
429 auto code = read_wasm( std::string(wasm_directory) + "align.94.wasm");
430 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
431}
432
433BACKEND_TEST_CASE( "Testing wasm <align_95_wasm>", "[align_95_wasm_tests]" ) {
435 auto code = read_wasm( std::string(wasm_directory) + "align.95.wasm");
436 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
437}
438
439BACKEND_TEST_CASE( "Testing wasm <align_96_wasm>", "[align_96_wasm_tests]" ) {
441 auto code = read_wasm( std::string(wasm_directory) + "align.96.wasm");
442 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
443}
444
445BACKEND_TEST_CASE( "Testing wasm <align_97_wasm>", "[align_97_wasm_tests]" ) {
447 auto code = read_wasm( std::string(wasm_directory) + "align.97.wasm");
448 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
449}
450
451BACKEND_TEST_CASE( "Testing wasm <align_98_wasm>", "[align_98_wasm_tests]" ) {
453 auto code = read_wasm( std::string(wasm_directory) + "align.98.wasm");
454 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
455}
456
457BACKEND_TEST_CASE( "Testing wasm <align_99_wasm>", "[align_99_wasm_tests]" ) {
459 auto code = read_wasm( std::string(wasm_directory) + "align.99.wasm");
460 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
461}
462
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 UINT64_C(val)
Definition stdint.h:284
#define BACKEND_TEST_CASE(name, tags)
Definition utils.hpp:59
T bit_cast(const U &u)
Definition utils.hpp:35