Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
binary_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 <binary_0_wasm>", "[binary_0_wasm_tests]" ) {
20 auto code = read_wasm( std::string(wasm_directory) + "binary.0.wasm");
21 backend_t bkend( code, &wa );
22
23}
24
25BACKEND_TEST_CASE( "Testing wasm <binary_1_wasm>", "[binary_1_wasm_tests]" ) {
27 auto code = read_wasm( std::string(wasm_directory) + "binary.1.wasm");
28 backend_t bkend( code, &wa );
29
30}
31
32BACKEND_TEST_CASE( "Testing wasm <binary_10_wasm>", "[binary_10_wasm_tests]" ) {
34 auto code = read_wasm( std::string(wasm_directory) + "binary.10.wasm");
35 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
36}
37
38BACKEND_TEST_CASE( "Testing wasm <binary_11_wasm>", "[binary_11_wasm_tests]" ) {
40 auto code = read_wasm( std::string(wasm_directory) + "binary.11.wasm");
41 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
42}
43
44BACKEND_TEST_CASE( "Testing wasm <binary_12_wasm>", "[binary_12_wasm_tests]" ) {
46 auto code = read_wasm( std::string(wasm_directory) + "binary.12.wasm");
47 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
48}
49
50BACKEND_TEST_CASE( "Testing wasm <binary_13_wasm>", "[binary_13_wasm_tests]" ) {
52 auto code = read_wasm( std::string(wasm_directory) + "binary.13.wasm");
53 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
54}
55
56BACKEND_TEST_CASE( "Testing wasm <binary_14_wasm>", "[binary_14_wasm_tests]" ) {
58 auto code = read_wasm( std::string(wasm_directory) + "binary.14.wasm");
59 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
60}
61
62BACKEND_TEST_CASE( "Testing wasm <binary_15_wasm>", "[binary_15_wasm_tests]" ) {
64 auto code = read_wasm( std::string(wasm_directory) + "binary.15.wasm");
65 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
66}
67
68BACKEND_TEST_CASE( "Testing wasm <binary_16_wasm>", "[binary_16_wasm_tests]" ) {
70 auto code = read_wasm( std::string(wasm_directory) + "binary.16.wasm");
71 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
72}
73
74BACKEND_TEST_CASE( "Testing wasm <binary_17_wasm>", "[binary_17_wasm_tests]" ) {
76 auto code = read_wasm( std::string(wasm_directory) + "binary.17.wasm");
77 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
78}
79
80BACKEND_TEST_CASE( "Testing wasm <binary_18_wasm>", "[binary_18_wasm_tests]" ) {
82 auto code = read_wasm( std::string(wasm_directory) + "binary.18.wasm");
83 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
84}
85
86BACKEND_TEST_CASE( "Testing wasm <binary_19_wasm>", "[binary_19_wasm_tests]" ) {
88 auto code = read_wasm( std::string(wasm_directory) + "binary.19.wasm");
89 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
90}
91
92BACKEND_TEST_CASE( "Testing wasm <binary_2_wasm>", "[binary_2_wasm_tests]" ) {
94 auto code = read_wasm( std::string(wasm_directory) + "binary.2.wasm");
95 backend_t bkend( code, &wa );
96
97}
98
99BACKEND_TEST_CASE( "Testing wasm <binary_20_wasm>", "[binary_20_wasm_tests]" ) {
101 auto code = read_wasm( std::string(wasm_directory) + "binary.20.wasm");
102 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
103}
104
105BACKEND_TEST_CASE( "Testing wasm <binary_21_wasm>", "[binary_21_wasm_tests]" ) {
107 auto code = read_wasm( std::string(wasm_directory) + "binary.21.wasm");
108 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
109}
110
111BACKEND_TEST_CASE( "Testing wasm <binary_22_wasm>", "[binary_22_wasm_tests]" ) {
113 auto code = read_wasm( std::string(wasm_directory) + "binary.22.wasm");
114 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
115}
116
117BACKEND_TEST_CASE( "Testing wasm <binary_23_wasm>", "[binary_23_wasm_tests]" ) {
119 auto code = read_wasm( std::string(wasm_directory) + "binary.23.wasm");
120 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
121}
122
123BACKEND_TEST_CASE( "Testing wasm <binary_24_wasm>", "[binary_24_wasm_tests]" ) {
125 auto code = read_wasm( std::string(wasm_directory) + "binary.24.wasm");
126 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
127}
128
129BACKEND_TEST_CASE( "Testing wasm <binary_25_wasm>", "[binary_25_wasm_tests]" ) {
131 auto code = read_wasm( std::string(wasm_directory) + "binary.25.wasm");
132 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
133}
134
135BACKEND_TEST_CASE( "Testing wasm <binary_26_wasm>", "[binary_26_wasm_tests]" ) {
137 auto code = read_wasm( std::string(wasm_directory) + "binary.26.wasm");
138 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
139}
140
141BACKEND_TEST_CASE( "Testing wasm <binary_27_wasm>", "[binary_27_wasm_tests]" ) {
143 auto code = read_wasm( std::string(wasm_directory) + "binary.27.wasm");
144 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
145}
146
147BACKEND_TEST_CASE( "Testing wasm <binary_28_wasm>", "[binary_28_wasm_tests]" ) {
149 auto code = read_wasm( std::string(wasm_directory) + "binary.28.wasm");
150 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
151}
152
153BACKEND_TEST_CASE( "Testing wasm <binary_29_wasm>", "[binary_29_wasm_tests]" ) {
155 auto code = read_wasm( std::string(wasm_directory) + "binary.29.wasm");
156 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
157}
158
159BACKEND_TEST_CASE( "Testing wasm <binary_3_wasm>", "[binary_3_wasm_tests]" ) {
161 auto code = read_wasm( std::string(wasm_directory) + "binary.3.wasm");
162 backend_t bkend( code, &wa );
163
164}
165
166BACKEND_TEST_CASE( "Testing wasm <binary_30_wasm>", "[binary_30_wasm_tests]" ) {
168 auto code = read_wasm( std::string(wasm_directory) + "binary.30.wasm");
169 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
170}
171
172BACKEND_TEST_CASE( "Testing wasm <binary_31_wasm>", "[binary_31_wasm_tests]" ) {
174 auto code = read_wasm( std::string(wasm_directory) + "binary.31.wasm");
175 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
176}
177
178BACKEND_TEST_CASE( "Testing wasm <binary_32_wasm>", "[binary_32_wasm_tests]" ) {
180 auto code = read_wasm( std::string(wasm_directory) + "binary.32.wasm");
181 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
182}
183
184BACKEND_TEST_CASE( "Testing wasm <binary_33_wasm>", "[binary_33_wasm_tests]" ) {
186 auto code = read_wasm( std::string(wasm_directory) + "binary.33.wasm");
187 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
188}
189
190BACKEND_TEST_CASE( "Testing wasm <binary_34_wasm>", "[binary_34_wasm_tests]" ) {
192 auto code = read_wasm( std::string(wasm_directory) + "binary.34.wasm");
193 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
194}
195
196BACKEND_TEST_CASE( "Testing wasm <binary_35_wasm>", "[binary_35_wasm_tests]" ) {
198 auto code = read_wasm( std::string(wasm_directory) + "binary.35.wasm");
199 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
200}
201
202BACKEND_TEST_CASE( "Testing wasm <binary_36_wasm>", "[binary_36_wasm_tests]" ) {
204 auto code = read_wasm( std::string(wasm_directory) + "binary.36.wasm");
205 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
206}
207
208BACKEND_TEST_CASE( "Testing wasm <binary_37_wasm>", "[binary_37_wasm_tests]" ) {
210 auto code = read_wasm( std::string(wasm_directory) + "binary.37.wasm");
211 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
212}
213
214BACKEND_TEST_CASE( "Testing wasm <binary_38_wasm>", "[binary_38_wasm_tests]" ) {
216 auto code = read_wasm( std::string(wasm_directory) + "binary.38.wasm");
217 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
218}
219
220BACKEND_TEST_CASE( "Testing wasm <binary_39_wasm>", "[binary_39_wasm_tests]" ) {
222 auto code = read_wasm( std::string(wasm_directory) + "binary.39.wasm");
223 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
224}
225
226BACKEND_TEST_CASE( "Testing wasm <binary_4_wasm>", "[binary_4_wasm_tests]" ) {
228 auto code = read_wasm( std::string(wasm_directory) + "binary.4.wasm");
229 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
230}
231
232BACKEND_TEST_CASE( "Testing wasm <binary_40_wasm>", "[binary_40_wasm_tests]" ) {
234 auto code = read_wasm( std::string(wasm_directory) + "binary.40.wasm");
235 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
236}
237
238BACKEND_TEST_CASE( "Testing wasm <binary_41_wasm>", "[binary_41_wasm_tests]" ) {
240 auto code = read_wasm( std::string(wasm_directory) + "binary.41.wasm");
241 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
242}
243
244BACKEND_TEST_CASE( "Testing wasm <binary_42_wasm>", "[binary_42_wasm_tests]" ) {
246 auto code = read_wasm( std::string(wasm_directory) + "binary.42.wasm");
247 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
248}
249
250BACKEND_TEST_CASE( "Testing wasm <binary_43_wasm>", "[binary_43_wasm_tests]" ) {
252 auto code = read_wasm( std::string(wasm_directory) + "binary.43.wasm");
253 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
254}
255
256BACKEND_TEST_CASE( "Testing wasm <binary_44_wasm>", "[binary_44_wasm_tests]" ) {
258 auto code = read_wasm( std::string(wasm_directory) + "binary.44.wasm");
259 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
260}
261
262BACKEND_TEST_CASE( "Testing wasm <binary_45_wasm>", "[binary_45_wasm_tests]" ) {
264 auto code = read_wasm( std::string(wasm_directory) + "binary.45.wasm");
265 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
266}
267
268BACKEND_TEST_CASE( "Testing wasm <binary_46_wasm>", "[binary_46_wasm_tests]" ) {
270 auto code = read_wasm( std::string(wasm_directory) + "binary.46.wasm");
271 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
272}
273
274BACKEND_TEST_CASE( "Testing wasm <binary_47_wasm>", "[binary_47_wasm_tests]" ) {
276 auto code = read_wasm( std::string(wasm_directory) + "binary.47.wasm");
277 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
278}
279
280BACKEND_TEST_CASE( "Testing wasm <binary_48_wasm>", "[binary_48_wasm_tests]" ) {
282 auto code = read_wasm( std::string(wasm_directory) + "binary.48.wasm");
283 backend_t bkend( code, &wa );
284
285}
286
287BACKEND_TEST_CASE( "Testing wasm <binary_49_wasm>", "[binary_49_wasm_tests]" ) {
289 auto code = read_wasm( std::string(wasm_directory) + "binary.49.wasm");
290 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
291}
292
293BACKEND_TEST_CASE( "Testing wasm <binary_5_wasm>", "[binary_5_wasm_tests]" ) {
295 auto code = read_wasm( std::string(wasm_directory) + "binary.5.wasm");
296 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
297}
298
299BACKEND_TEST_CASE( "Testing wasm <binary_50_wasm>", "[binary_50_wasm_tests]" ) {
301 auto code = read_wasm( std::string(wasm_directory) + "binary.50.wasm");
302 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
303}
304
305BACKEND_TEST_CASE( "Testing wasm <binary_51_wasm>", "[binary_51_wasm_tests]" ) {
307 auto code = read_wasm( std::string(wasm_directory) + "binary.51.wasm");
308 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
309}
310
311BACKEND_TEST_CASE( "Testing wasm <binary_52_wasm>", "[binary_52_wasm_tests]" ) {
313 auto code = read_wasm( std::string(wasm_directory) + "binary.52.wasm");
314 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
315}
316
317BACKEND_TEST_CASE( "Testing wasm <binary_53_wasm>", "[binary_53_wasm_tests]" ) {
319 auto code = read_wasm( std::string(wasm_directory) + "binary.53.wasm");
320 backend_t bkend( code, &wa );
321
322}
323
324BACKEND_TEST_CASE( "Testing wasm <binary_54_wasm>", "[binary_54_wasm_tests]" ) {
326 auto code = read_wasm( std::string(wasm_directory) + "binary.54.wasm");
327 backend_t bkend( code, &wa );
328
329}
330
331BACKEND_TEST_CASE( "Testing wasm <binary_6_wasm>", "[binary_6_wasm_tests]" ) {
333 auto code = read_wasm( std::string(wasm_directory) + "binary.6.wasm");
334 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
335}
336
337BACKEND_TEST_CASE( "Testing wasm <binary_7_wasm>", "[binary_7_wasm_tests]" ) {
339 auto code = read_wasm( std::string(wasm_directory) + "binary.7.wasm");
340 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
341}
342
343BACKEND_TEST_CASE( "Testing wasm <binary_8_wasm>", "[binary_8_wasm_tests]" ) {
345 auto code = read_wasm( std::string(wasm_directory) + "binary.8.wasm");
346 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
347}
348
349BACKEND_TEST_CASE( "Testing wasm <binary_9_wasm>", "[binary_9_wasm_tests]" ) {
351 auto code = read_wasm( std::string(wasm_directory) + "binary.9.wasm");
352 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
353}
354
wasm_allocator wa
Definition main.cpp:10
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 BACKEND_TEST_CASE(name, tags)
Definition utils.hpp:59