Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
i32_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 <i32_0_wasm>", "[i32_0_wasm_tests]" ) {
20 auto code = read_wasm( std::string(wasm_directory) + "i32.0.wasm");
21 backend_t bkend( code, &wa );
22
23 CHECK(bkend.call_with_return("env", "add", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(2));
24 CHECK(bkend.call_with_return("env", "add", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
25 CHECK(bkend.call_with_return("env", "add", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(4294967294));
26 CHECK(bkend.call_with_return("env", "add", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(0));
27 CHECK(bkend.call_with_return("env", "add", UINT32_C(2147483647), UINT32_C(1))->to_ui32() == UINT32_C(2147483648));
28 CHECK(bkend.call_with_return("env", "add", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(2147483647));
29 CHECK(bkend.call_with_return("env", "add", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
30 CHECK(bkend.call_with_return("env", "add", UINT32_C(1073741823), UINT32_C(1))->to_ui32() == UINT32_C(1073741824));
31 CHECK(bkend.call_with_return("env", "sub", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
32 CHECK(bkend.call_with_return("env", "sub", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
33 CHECK(bkend.call_with_return("env", "sub", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
34 CHECK(bkend.call_with_return("env", "sub", UINT32_C(2147483647), UINT32_C(4294967295))->to_ui32() == UINT32_C(2147483648));
35 CHECK(bkend.call_with_return("env", "sub", UINT32_C(2147483648), UINT32_C(1))->to_ui32() == UINT32_C(2147483647));
36 CHECK(bkend.call_with_return("env", "sub", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
37 CHECK(bkend.call_with_return("env", "sub", UINT32_C(1073741823), UINT32_C(4294967295))->to_ui32() == UINT32_C(1073741824));
38 CHECK(bkend.call_with_return("env", "mul", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
39 CHECK(bkend.call_with_return("env", "mul", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(0));
40 CHECK(bkend.call_with_return("env", "mul", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
41 CHECK(bkend.call_with_return("env", "mul", UINT32_C(268435456), UINT32_C(4096))->to_ui32() == UINT32_C(0));
42 CHECK(bkend.call_with_return("env", "mul", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(0));
43 CHECK(bkend.call_with_return("env", "mul", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(2147483648));
44 CHECK(bkend.call_with_return("env", "mul", UINT32_C(2147483647), UINT32_C(4294967295))->to_ui32() == UINT32_C(2147483649));
45 CHECK(bkend.call_with_return("env", "mul", UINT32_C(19088743), UINT32_C(1985229328))->to_ui32() == UINT32_C(898528368));
46 CHECK(bkend.call_with_return("env", "mul", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
47 CHECK_THROWS_AS(bkend("env", "div_s", UINT32_C(1), UINT32_C(0)), std::exception);
48 CHECK_THROWS_AS(bkend("env", "div_s", UINT32_C(0), UINT32_C(0)), std::exception);
49 CHECK_THROWS_AS(bkend("env", "div_s", UINT32_C(2147483648), UINT32_C(4294967295)), std::exception);
50 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
51 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
52 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(0), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
53 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
54 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(2147483648), UINT32_C(2))->to_ui32() == UINT32_C(3221225472));
55 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(2147483649), UINT32_C(1000))->to_ui32() == UINT32_C(4292819813));
56 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(5), UINT32_C(2))->to_ui32() == UINT32_C(2));
57 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(4294967291), UINT32_C(2))->to_ui32() == UINT32_C(4294967294));
58 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(5), UINT32_C(4294967294))->to_ui32() == UINT32_C(4294967294));
59 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(4294967291), UINT32_C(4294967294))->to_ui32() == UINT32_C(2));
60 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(7), UINT32_C(3))->to_ui32() == UINT32_C(2));
61 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(4294967289), UINT32_C(3))->to_ui32() == UINT32_C(4294967294));
62 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(7), UINT32_C(4294967293))->to_ui32() == UINT32_C(4294967294));
63 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(4294967289), UINT32_C(4294967293))->to_ui32() == UINT32_C(2));
64 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(11), UINT32_C(5))->to_ui32() == UINT32_C(2));
65 CHECK(bkend.call_with_return("env", "div_s", UINT32_C(17), UINT32_C(7))->to_ui32() == UINT32_C(2));
66 CHECK_THROWS_AS(bkend("env", "div_u", UINT32_C(1), UINT32_C(0)), std::exception);
67 CHECK_THROWS_AS(bkend("env", "div_u", UINT32_C(0), UINT32_C(0)), std::exception);
68 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
69 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
70 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
71 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
72 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(2147483648), UINT32_C(2))->to_ui32() == UINT32_C(1073741824));
73 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(2414874608), UINT32_C(65537))->to_ui32() == UINT32_C(36847));
74 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(2147483649), UINT32_C(1000))->to_ui32() == UINT32_C(2147483));
75 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(5), UINT32_C(2))->to_ui32() == UINT32_C(2));
76 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(4294967291), UINT32_C(2))->to_ui32() == UINT32_C(2147483645));
77 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(5), UINT32_C(4294967294))->to_ui32() == UINT32_C(0));
78 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(4294967291), UINT32_C(4294967294))->to_ui32() == UINT32_C(0));
79 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(7), UINT32_C(3))->to_ui32() == UINT32_C(2));
80 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(11), UINT32_C(5))->to_ui32() == UINT32_C(2));
81 CHECK(bkend.call_with_return("env", "div_u", UINT32_C(17), UINT32_C(7))->to_ui32() == UINT32_C(2));
82 CHECK_THROWS_AS(bkend("env", "rem_s", UINT32_C(1), UINT32_C(0)), std::exception);
83 CHECK_THROWS_AS(bkend("env", "rem_s", UINT32_C(0), UINT32_C(0)), std::exception);
84 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(2147483647), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
85 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
86 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
87 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(0), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
88 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
89 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
90 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(2147483648), UINT32_C(2))->to_ui32() == UINT32_C(0));
91 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(2147483649), UINT32_C(1000))->to_ui32() == UINT32_C(4294966649));
92 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(5), UINT32_C(2))->to_ui32() == UINT32_C(1));
93 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(4294967291), UINT32_C(2))->to_ui32() == UINT32_C(4294967295));
94 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(5), UINT32_C(4294967294))->to_ui32() == UINT32_C(1));
95 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(4294967291), UINT32_C(4294967294))->to_ui32() == UINT32_C(4294967295));
96 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(7), UINT32_C(3))->to_ui32() == UINT32_C(1));
97 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(4294967289), UINT32_C(3))->to_ui32() == UINT32_C(4294967295));
98 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(7), UINT32_C(4294967293))->to_ui32() == UINT32_C(1));
99 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(4294967289), UINT32_C(4294967293))->to_ui32() == UINT32_C(4294967295));
100 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(11), UINT32_C(5))->to_ui32() == UINT32_C(1));
101 CHECK(bkend.call_with_return("env", "rem_s", UINT32_C(17), UINT32_C(7))->to_ui32() == UINT32_C(3));
102 CHECK_THROWS_AS(bkend("env", "rem_u", UINT32_C(1), UINT32_C(0)), std::exception);
103 CHECK_THROWS_AS(bkend("env", "rem_u", UINT32_C(0), UINT32_C(0)), std::exception);
104 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
105 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
106 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
107 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(2147483648));
108 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(2147483648), UINT32_C(2))->to_ui32() == UINT32_C(0));
109 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(2414874608), UINT32_C(65537))->to_ui32() == UINT32_C(32769));
110 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(2147483649), UINT32_C(1000))->to_ui32() == UINT32_C(649));
111 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(5), UINT32_C(2))->to_ui32() == UINT32_C(1));
112 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(4294967291), UINT32_C(2))->to_ui32() == UINT32_C(1));
113 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(5), UINT32_C(4294967294))->to_ui32() == UINT32_C(5));
114 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(4294967291), UINT32_C(4294967294))->to_ui32() == UINT32_C(4294967291));
115 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(7), UINT32_C(3))->to_ui32() == UINT32_C(1));
116 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(11), UINT32_C(5))->to_ui32() == UINT32_C(1));
117 CHECK(bkend.call_with_return("env", "rem_u", UINT32_C(17), UINT32_C(7))->to_ui32() == UINT32_C(3));
118 CHECK(bkend.call_with_return("env", "and", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(0));
119 CHECK(bkend.call_with_return("env", "and", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
120 CHECK(bkend.call_with_return("env", "and", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
121 CHECK(bkend.call_with_return("env", "and", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(0));
122 CHECK(bkend.call_with_return("env", "and", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
123 CHECK(bkend.call_with_return("env", "and", UINT32_C(2147483647), UINT32_C(4294967295))->to_ui32() == UINT32_C(2147483647));
124 CHECK(bkend.call_with_return("env", "and", UINT32_C(4042326015), UINT32_C(4294963440))->to_ui32() == UINT32_C(4042322160));
125 CHECK(bkend.call_with_return("env", "and", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(4294967295));
126 CHECK(bkend.call_with_return("env", "or", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
127 CHECK(bkend.call_with_return("env", "or", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(1));
128 CHECK(bkend.call_with_return("env", "or", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
129 CHECK(bkend.call_with_return("env", "or", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(0));
130 CHECK(bkend.call_with_return("env", "or", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(4294967295));
131 CHECK(bkend.call_with_return("env", "or", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(2147483648));
132 CHECK(bkend.call_with_return("env", "or", UINT32_C(4042326015), UINT32_C(4294963440))->to_ui32() == UINT32_C(4294967295));
133 CHECK(bkend.call_with_return("env", "or", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(4294967295));
134 CHECK(bkend.call_with_return("env", "xor", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
135 CHECK(bkend.call_with_return("env", "xor", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(1));
136 CHECK(bkend.call_with_return("env", "xor", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
137 CHECK(bkend.call_with_return("env", "xor", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(0));
138 CHECK(bkend.call_with_return("env", "xor", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(4294967295));
139 CHECK(bkend.call_with_return("env", "xor", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(2147483648));
140 CHECK(bkend.call_with_return("env", "xor", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(2147483647));
141 CHECK(bkend.call_with_return("env", "xor", UINT32_C(4294967295), UINT32_C(2147483647))->to_ui32() == UINT32_C(2147483648));
142 CHECK(bkend.call_with_return("env", "xor", UINT32_C(4042326015), UINT32_C(4294963440))->to_ui32() == UINT32_C(252645135));
143 CHECK(bkend.call_with_return("env", "xor", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
144 CHECK(bkend.call_with_return("env", "shl", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(2));
145 CHECK(bkend.call_with_return("env", "shl", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
146 CHECK(bkend.call_with_return("env", "shl", UINT32_C(2147483647), UINT32_C(1))->to_ui32() == UINT32_C(4294967294));
147 CHECK(bkend.call_with_return("env", "shl", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(4294967294));
148 CHECK(bkend.call_with_return("env", "shl", UINT32_C(2147483648), UINT32_C(1))->to_ui32() == UINT32_C(0));
149 CHECK(bkend.call_with_return("env", "shl", UINT32_C(1073741824), UINT32_C(1))->to_ui32() == UINT32_C(2147483648));
150 CHECK(bkend.call_with_return("env", "shl", UINT32_C(1), UINT32_C(31))->to_ui32() == UINT32_C(2147483648));
151 CHECK(bkend.call_with_return("env", "shl", UINT32_C(1), UINT32_C(32))->to_ui32() == UINT32_C(1));
152 CHECK(bkend.call_with_return("env", "shl", UINT32_C(1), UINT32_C(33))->to_ui32() == UINT32_C(2));
153 CHECK(bkend.call_with_return("env", "shl", UINT32_C(1), UINT32_C(4294967295))->to_ui32() == UINT32_C(2147483648));
154 CHECK(bkend.call_with_return("env", "shl", UINT32_C(1), UINT32_C(2147483647))->to_ui32() == UINT32_C(2147483648));
155 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
156 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
157 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(4294967295));
158 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(2147483647), UINT32_C(1))->to_ui32() == UINT32_C(1073741823));
159 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(2147483648), UINT32_C(1))->to_ui32() == UINT32_C(3221225472));
160 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(1073741824), UINT32_C(1))->to_ui32() == UINT32_C(536870912));
161 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(1), UINT32_C(32))->to_ui32() == UINT32_C(1));
162 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(1), UINT32_C(33))->to_ui32() == UINT32_C(0));
163 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(1), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
164 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(1), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
165 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(1), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
166 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(2147483648), UINT32_C(31))->to_ui32() == UINT32_C(4294967295));
167 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(4294967295), UINT32_C(32))->to_ui32() == UINT32_C(4294967295));
168 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(4294967295), UINT32_C(33))->to_ui32() == UINT32_C(4294967295));
169 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(4294967295));
170 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(4294967295), UINT32_C(2147483647))->to_ui32() == UINT32_C(4294967295));
171 CHECK(bkend.call_with_return("env", "shr_s", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(4294967295));
172 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
173 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
174 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(2147483647));
175 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(2147483647), UINT32_C(1))->to_ui32() == UINT32_C(1073741823));
176 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(2147483648), UINT32_C(1))->to_ui32() == UINT32_C(1073741824));
177 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(1073741824), UINT32_C(1))->to_ui32() == UINT32_C(536870912));
178 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(1), UINT32_C(32))->to_ui32() == UINT32_C(1));
179 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(1), UINT32_C(33))->to_ui32() == UINT32_C(0));
180 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(1), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
181 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(1), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
182 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(1), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
183 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(2147483648), UINT32_C(31))->to_ui32() == UINT32_C(1));
184 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(4294967295), UINT32_C(32))->to_ui32() == UINT32_C(4294967295));
185 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(4294967295), UINT32_C(33))->to_ui32() == UINT32_C(2147483647));
186 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
187 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(4294967295), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
188 CHECK(bkend.call_with_return("env", "shr_u", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(4294967295));
189 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(2));
190 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
191 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(4294967295));
192 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(1), UINT32_C(32))->to_ui32() == UINT32_C(1));
193 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(2882377846), UINT32_C(1))->to_ui32() == UINT32_C(1469788397));
194 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(4261469184), UINT32_C(4))->to_ui32() == UINT32_C(3758997519));
195 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(2965492451), UINT32_C(5))->to_ui32() == UINT32_C(406477942));
196 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(32768), UINT32_C(37))->to_ui32() == UINT32_C(1048576));
197 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(2965492451), UINT32_C(65285))->to_ui32() == UINT32_C(406477942));
198 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(1989852383), UINT32_C(4294967277))->to_ui32() == UINT32_C(1469837011));
199 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(1989852383), UINT32_C(2147483661))->to_ui32() == UINT32_C(1469837011));
200 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(1), UINT32_C(31))->to_ui32() == UINT32_C(2147483648));
201 CHECK(bkend.call_with_return("env", "rotl", UINT32_C(2147483648), UINT32_C(1))->to_ui32() == UINT32_C(1));
202 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(2147483648));
203 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
204 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(4294967295));
205 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(1), UINT32_C(32))->to_ui32() == UINT32_C(1));
206 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(4278242304), UINT32_C(1))->to_ui32() == UINT32_C(2139121152));
207 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(524288), UINT32_C(4))->to_ui32() == UINT32_C(32768));
208 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(2965492451), UINT32_C(5))->to_ui32() == UINT32_C(495324823));
209 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(32768), UINT32_C(37))->to_ui32() == UINT32_C(1024));
210 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(2965492451), UINT32_C(65285))->to_ui32() == UINT32_C(495324823));
211 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(1989852383), UINT32_C(4294967277))->to_ui32() == UINT32_C(3875255509));
212 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(1989852383), UINT32_C(2147483661))->to_ui32() == UINT32_C(3875255509));
213 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(1), UINT32_C(31))->to_ui32() == UINT32_C(2));
214 CHECK(bkend.call_with_return("env", "rotr", UINT32_C(2147483648), UINT32_C(31))->to_ui32() == UINT32_C(1));
215 CHECK(bkend.call_with_return("env", "clz", UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
216 CHECK(bkend.call_with_return("env", "clz", UINT32_C(0))->to_ui32() == UINT32_C(32));
217 CHECK(bkend.call_with_return("env", "clz", UINT32_C(32768))->to_ui32() == UINT32_C(16));
218 CHECK(bkend.call_with_return("env", "clz", UINT32_C(255))->to_ui32() == UINT32_C(24));
219 CHECK(bkend.call_with_return("env", "clz", UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
220 CHECK(bkend.call_with_return("env", "clz", UINT32_C(1))->to_ui32() == UINT32_C(31));
221 CHECK(bkend.call_with_return("env", "clz", UINT32_C(2))->to_ui32() == UINT32_C(30));
222 CHECK(bkend.call_with_return("env", "clz", UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
223 CHECK(bkend.call_with_return("env", "ctz", UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
224 CHECK(bkend.call_with_return("env", "ctz", UINT32_C(0))->to_ui32() == UINT32_C(32));
225 CHECK(bkend.call_with_return("env", "ctz", UINT32_C(32768))->to_ui32() == UINT32_C(15));
226 CHECK(bkend.call_with_return("env", "ctz", UINT32_C(65536))->to_ui32() == UINT32_C(16));
227 CHECK(bkend.call_with_return("env", "ctz", UINT32_C(2147483648))->to_ui32() == UINT32_C(31));
228 CHECK(bkend.call_with_return("env", "ctz", UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
229 CHECK(bkend.call_with_return("env", "popcnt", UINT32_C(4294967295))->to_ui32() == UINT32_C(32));
230 CHECK(bkend.call_with_return("env", "popcnt", UINT32_C(0))->to_ui32() == UINT32_C(0));
231 CHECK(bkend.call_with_return("env", "popcnt", UINT32_C(32768))->to_ui32() == UINT32_C(1));
232 CHECK(bkend.call_with_return("env", "popcnt", UINT32_C(2147516416))->to_ui32() == UINT32_C(2));
233 CHECK(bkend.call_with_return("env", "popcnt", UINT32_C(2147483647))->to_ui32() == UINT32_C(31));
234 CHECK(bkend.call_with_return("env", "popcnt", UINT32_C(2863311530))->to_ui32() == UINT32_C(16));
235 CHECK(bkend.call_with_return("env", "popcnt", UINT32_C(1431655765))->to_ui32() == UINT32_C(16));
236 CHECK(bkend.call_with_return("env", "popcnt", UINT32_C(3735928559))->to_ui32() == UINT32_C(24));
237 CHECK(bkend.call_with_return("env", "eqz", UINT32_C(0))->to_ui32() == UINT32_C(1));
238 CHECK(bkend.call_with_return("env", "eqz", UINT32_C(1))->to_ui32() == UINT32_C(0));
239 CHECK(bkend.call_with_return("env", "eqz", UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
240 CHECK(bkend.call_with_return("env", "eqz", UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
241 CHECK(bkend.call_with_return("env", "eqz", UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
242 CHECK(bkend.call_with_return("env", "eq", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(1));
243 CHECK(bkend.call_with_return("env", "eq", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
244 CHECK(bkend.call_with_return("env", "eq", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(0));
245 CHECK(bkend.call_with_return("env", "eq", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
246 CHECK(bkend.call_with_return("env", "eq", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
247 CHECK(bkend.call_with_return("env", "eq", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
248 CHECK(bkend.call_with_return("env", "eq", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(0));
249 CHECK(bkend.call_with_return("env", "eq", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
250 CHECK(bkend.call_with_return("env", "eq", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(0));
251 CHECK(bkend.call_with_return("env", "eq", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
252 CHECK(bkend.call_with_return("env", "eq", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
253 CHECK(bkend.call_with_return("env", "eq", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
254 CHECK(bkend.call_with_return("env", "eq", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
255 CHECK(bkend.call_with_return("env", "eq", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
256 CHECK(bkend.call_with_return("env", "ne", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(0));
257 CHECK(bkend.call_with_return("env", "ne", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
258 CHECK(bkend.call_with_return("env", "ne", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(1));
259 CHECK(bkend.call_with_return("env", "ne", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
260 CHECK(bkend.call_with_return("env", "ne", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
261 CHECK(bkend.call_with_return("env", "ne", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
262 CHECK(bkend.call_with_return("env", "ne", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
263 CHECK(bkend.call_with_return("env", "ne", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(1));
264 CHECK(bkend.call_with_return("env", "ne", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(1));
265 CHECK(bkend.call_with_return("env", "ne", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
266 CHECK(bkend.call_with_return("env", "ne", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
267 CHECK(bkend.call_with_return("env", "ne", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
268 CHECK(bkend.call_with_return("env", "ne", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
269 CHECK(bkend.call_with_return("env", "ne", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
270 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(0));
271 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
272 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(1));
273 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
274 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
275 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
276 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(0));
277 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(1));
278 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(1));
279 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
280 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
281 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
282 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
283 CHECK(bkend.call_with_return("env", "lt_s", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
284 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(0));
285 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
286 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(0));
287 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
288 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
289 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
290 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(0));
291 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(1));
292 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(0));
293 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
294 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
295 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
296 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
297 CHECK(bkend.call_with_return("env", "lt_u", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
298 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(1));
299 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
300 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(1));
301 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
302 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
303 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
304 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(0));
305 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(1));
306 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(1));
307 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
308 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
309 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
310 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
311 CHECK(bkend.call_with_return("env", "le_s", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
312 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(1));
313 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
314 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(0));
315 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
316 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
317 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
318 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(0));
319 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(1));
320 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(0));
321 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
322 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
323 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
324 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
325 CHECK(bkend.call_with_return("env", "le_u", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
326 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(0));
327 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
328 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(0));
329 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
330 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
331 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
332 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
333 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
334 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(0));
335 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
336 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
337 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
338 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
339 CHECK(bkend.call_with_return("env", "gt_s", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
340 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(0));
341 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(0));
342 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(1));
343 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
344 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
345 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
346 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
347 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
348 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(1));
349 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
350 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
351 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
352 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
353 CHECK(bkend.call_with_return("env", "gt_u", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
354 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(1));
355 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
356 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(0));
357 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
358 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
359 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
360 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
361 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
362 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(0));
363 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
364 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
365 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
366 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(0));
367 CHECK(bkend.call_with_return("env", "ge_s", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
368 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(1));
369 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(1), UINT32_C(1))->to_ui32() == UINT32_C(1));
370 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(4294967295), UINT32_C(1))->to_ui32() == UINT32_C(1));
371 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(2147483648), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
372 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(2147483647), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
373 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(4294967295), UINT32_C(4294967295))->to_ui32() == UINT32_C(1));
374 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(1), UINT32_C(0))->to_ui32() == UINT32_C(1));
375 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(0), UINT32_C(1))->to_ui32() == UINT32_C(0));
376 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(2147483648), UINT32_C(0))->to_ui32() == UINT32_C(1));
377 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(0), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
378 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(2147483648), UINT32_C(4294967295))->to_ui32() == UINT32_C(0));
379 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(4294967295), UINT32_C(2147483648))->to_ui32() == UINT32_C(1));
380 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(2147483648), UINT32_C(2147483647))->to_ui32() == UINT32_C(1));
381 CHECK(bkend.call_with_return("env", "ge_u", UINT32_C(2147483647), UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
382}
383
384BACKEND_TEST_CASE( "Testing wasm <i32_1_wasm>", "[i32_1_wasm_tests]" ) {
386 auto code = read_wasm( std::string(wasm_directory) + "i32.1.wasm");
387 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
388}
389
390BACKEND_TEST_CASE( "Testing wasm <i32_10_wasm>", "[i32_10_wasm_tests]" ) {
392 auto code = read_wasm( std::string(wasm_directory) + "i32.10.wasm");
393 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
394}
395
396BACKEND_TEST_CASE( "Testing wasm <i32_11_wasm>", "[i32_11_wasm_tests]" ) {
398 auto code = read_wasm( std::string(wasm_directory) + "i32.11.wasm");
399 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
400}
401
402BACKEND_TEST_CASE( "Testing wasm <i32_12_wasm>", "[i32_12_wasm_tests]" ) {
404 auto code = read_wasm( std::string(wasm_directory) + "i32.12.wasm");
405 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
406}
407
408BACKEND_TEST_CASE( "Testing wasm <i32_13_wasm>", "[i32_13_wasm_tests]" ) {
410 auto code = read_wasm( std::string(wasm_directory) + "i32.13.wasm");
411 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
412}
413
414BACKEND_TEST_CASE( "Testing wasm <i32_14_wasm>", "[i32_14_wasm_tests]" ) {
416 auto code = read_wasm( std::string(wasm_directory) + "i32.14.wasm");
417 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
418}
419
420BACKEND_TEST_CASE( "Testing wasm <i32_15_wasm>", "[i32_15_wasm_tests]" ) {
422 auto code = read_wasm( std::string(wasm_directory) + "i32.15.wasm");
423 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
424}
425
426BACKEND_TEST_CASE( "Testing wasm <i32_16_wasm>", "[i32_16_wasm_tests]" ) {
428 auto code = read_wasm( std::string(wasm_directory) + "i32.16.wasm");
429 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
430}
431
432BACKEND_TEST_CASE( "Testing wasm <i32_17_wasm>", "[i32_17_wasm_tests]" ) {
434 auto code = read_wasm( std::string(wasm_directory) + "i32.17.wasm");
435 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
436}
437
438BACKEND_TEST_CASE( "Testing wasm <i32_18_wasm>", "[i32_18_wasm_tests]" ) {
440 auto code = read_wasm( std::string(wasm_directory) + "i32.18.wasm");
441 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
442}
443
444BACKEND_TEST_CASE( "Testing wasm <i32_19_wasm>", "[i32_19_wasm_tests]" ) {
446 auto code = read_wasm( std::string(wasm_directory) + "i32.19.wasm");
447 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
448}
449
450BACKEND_TEST_CASE( "Testing wasm <i32_2_wasm>", "[i32_2_wasm_tests]" ) {
452 auto code = read_wasm( std::string(wasm_directory) + "i32.2.wasm");
453 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
454}
455
456BACKEND_TEST_CASE( "Testing wasm <i32_20_wasm>", "[i32_20_wasm_tests]" ) {
458 auto code = read_wasm( std::string(wasm_directory) + "i32.20.wasm");
459 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
460}
461
462BACKEND_TEST_CASE( "Testing wasm <i32_21_wasm>", "[i32_21_wasm_tests]" ) {
464 auto code = read_wasm( std::string(wasm_directory) + "i32.21.wasm");
465 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
466}
467
468BACKEND_TEST_CASE( "Testing wasm <i32_22_wasm>", "[i32_22_wasm_tests]" ) {
470 auto code = read_wasm( std::string(wasm_directory) + "i32.22.wasm");
471 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
472}
473
474BACKEND_TEST_CASE( "Testing wasm <i32_23_wasm>", "[i32_23_wasm_tests]" ) {
476 auto code = read_wasm( std::string(wasm_directory) + "i32.23.wasm");
477 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
478}
479
480BACKEND_TEST_CASE( "Testing wasm <i32_24_wasm>", "[i32_24_wasm_tests]" ) {
482 auto code = read_wasm( std::string(wasm_directory) + "i32.24.wasm");
483 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
484}
485
486BACKEND_TEST_CASE( "Testing wasm <i32_25_wasm>", "[i32_25_wasm_tests]" ) {
488 auto code = read_wasm( std::string(wasm_directory) + "i32.25.wasm");
489 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
490}
491
492BACKEND_TEST_CASE( "Testing wasm <i32_26_wasm>", "[i32_26_wasm_tests]" ) {
494 auto code = read_wasm( std::string(wasm_directory) + "i32.26.wasm");
495 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
496}
497
498BACKEND_TEST_CASE( "Testing wasm <i32_27_wasm>", "[i32_27_wasm_tests]" ) {
500 auto code = read_wasm( std::string(wasm_directory) + "i32.27.wasm");
501 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
502}
503
504BACKEND_TEST_CASE( "Testing wasm <i32_28_wasm>", "[i32_28_wasm_tests]" ) {
506 auto code = read_wasm( std::string(wasm_directory) + "i32.28.wasm");
507 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
508}
509
510BACKEND_TEST_CASE( "Testing wasm <i32_29_wasm>", "[i32_29_wasm_tests]" ) {
512 auto code = read_wasm( std::string(wasm_directory) + "i32.29.wasm");
513 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
514}
515
516BACKEND_TEST_CASE( "Testing wasm <i32_3_wasm>", "[i32_3_wasm_tests]" ) {
518 auto code = read_wasm( std::string(wasm_directory) + "i32.3.wasm");
519 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
520}
521
522BACKEND_TEST_CASE( "Testing wasm <i32_30_wasm>", "[i32_30_wasm_tests]" ) {
524 auto code = read_wasm( std::string(wasm_directory) + "i32.30.wasm");
525 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
526}
527
528BACKEND_TEST_CASE( "Testing wasm <i32_31_wasm>", "[i32_31_wasm_tests]" ) {
530 auto code = read_wasm( std::string(wasm_directory) + "i32.31.wasm");
531 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
532}
533
534BACKEND_TEST_CASE( "Testing wasm <i32_32_wasm>", "[i32_32_wasm_tests]" ) {
536 auto code = read_wasm( std::string(wasm_directory) + "i32.32.wasm");
537 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
538}
539
540BACKEND_TEST_CASE( "Testing wasm <i32_33_wasm>", "[i32_33_wasm_tests]" ) {
542 auto code = read_wasm( std::string(wasm_directory) + "i32.33.wasm");
543 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
544}
545
546BACKEND_TEST_CASE( "Testing wasm <i32_34_wasm>", "[i32_34_wasm_tests]" ) {
548 auto code = read_wasm( std::string(wasm_directory) + "i32.34.wasm");
549 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
550}
551
552BACKEND_TEST_CASE( "Testing wasm <i32_35_wasm>", "[i32_35_wasm_tests]" ) {
554 auto code = read_wasm( std::string(wasm_directory) + "i32.35.wasm");
555 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
556}
557
558BACKEND_TEST_CASE( "Testing wasm <i32_36_wasm>", "[i32_36_wasm_tests]" ) {
560 auto code = read_wasm( std::string(wasm_directory) + "i32.36.wasm");
561 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
562}
563
564BACKEND_TEST_CASE( "Testing wasm <i32_37_wasm>", "[i32_37_wasm_tests]" ) {
566 auto code = read_wasm( std::string(wasm_directory) + "i32.37.wasm");
567 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
568}
569
570BACKEND_TEST_CASE( "Testing wasm <i32_38_wasm>", "[i32_38_wasm_tests]" ) {
572 auto code = read_wasm( std::string(wasm_directory) + "i32.38.wasm");
573 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
574}
575
576BACKEND_TEST_CASE( "Testing wasm <i32_39_wasm>", "[i32_39_wasm_tests]" ) {
578 auto code = read_wasm( std::string(wasm_directory) + "i32.39.wasm");
579 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
580}
581
582BACKEND_TEST_CASE( "Testing wasm <i32_4_wasm>", "[i32_4_wasm_tests]" ) {
584 auto code = read_wasm( std::string(wasm_directory) + "i32.4.wasm");
585 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
586}
587
588BACKEND_TEST_CASE( "Testing wasm <i32_40_wasm>", "[i32_40_wasm_tests]" ) {
590 auto code = read_wasm( std::string(wasm_directory) + "i32.40.wasm");
591 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
592}
593
594BACKEND_TEST_CASE( "Testing wasm <i32_41_wasm>", "[i32_41_wasm_tests]" ) {
596 auto code = read_wasm( std::string(wasm_directory) + "i32.41.wasm");
597 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
598}
599
600BACKEND_TEST_CASE( "Testing wasm <i32_42_wasm>", "[i32_42_wasm_tests]" ) {
602 auto code = read_wasm( std::string(wasm_directory) + "i32.42.wasm");
603 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
604}
605
606BACKEND_TEST_CASE( "Testing wasm <i32_43_wasm>", "[i32_43_wasm_tests]" ) {
608 auto code = read_wasm( std::string(wasm_directory) + "i32.43.wasm");
609 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
610}
611
612BACKEND_TEST_CASE( "Testing wasm <i32_44_wasm>", "[i32_44_wasm_tests]" ) {
614 auto code = read_wasm( std::string(wasm_directory) + "i32.44.wasm");
615 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
616}
617
618BACKEND_TEST_CASE( "Testing wasm <i32_45_wasm>", "[i32_45_wasm_tests]" ) {
620 auto code = read_wasm( std::string(wasm_directory) + "i32.45.wasm");
621 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
622}
623
624BACKEND_TEST_CASE( "Testing wasm <i32_46_wasm>", "[i32_46_wasm_tests]" ) {
626 auto code = read_wasm( std::string(wasm_directory) + "i32.46.wasm");
627 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
628}
629
630BACKEND_TEST_CASE( "Testing wasm <i32_47_wasm>", "[i32_47_wasm_tests]" ) {
632 auto code = read_wasm( std::string(wasm_directory) + "i32.47.wasm");
633 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
634}
635
636BACKEND_TEST_CASE( "Testing wasm <i32_48_wasm>", "[i32_48_wasm_tests]" ) {
638 auto code = read_wasm( std::string(wasm_directory) + "i32.48.wasm");
639 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
640}
641
642BACKEND_TEST_CASE( "Testing wasm <i32_49_wasm>", "[i32_49_wasm_tests]" ) {
644 auto code = read_wasm( std::string(wasm_directory) + "i32.49.wasm");
645 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
646}
647
648BACKEND_TEST_CASE( "Testing wasm <i32_5_wasm>", "[i32_5_wasm_tests]" ) {
650 auto code = read_wasm( std::string(wasm_directory) + "i32.5.wasm");
651 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
652}
653
654BACKEND_TEST_CASE( "Testing wasm <i32_50_wasm>", "[i32_50_wasm_tests]" ) {
656 auto code = read_wasm( std::string(wasm_directory) + "i32.50.wasm");
657 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
658}
659
660BACKEND_TEST_CASE( "Testing wasm <i32_51_wasm>", "[i32_51_wasm_tests]" ) {
662 auto code = read_wasm( std::string(wasm_directory) + "i32.51.wasm");
663 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
664}
665
666BACKEND_TEST_CASE( "Testing wasm <i32_52_wasm>", "[i32_52_wasm_tests]" ) {
668 auto code = read_wasm( std::string(wasm_directory) + "i32.52.wasm");
669 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
670}
671
672BACKEND_TEST_CASE( "Testing wasm <i32_53_wasm>", "[i32_53_wasm_tests]" ) {
674 auto code = read_wasm( std::string(wasm_directory) + "i32.53.wasm");
675 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
676}
677
678BACKEND_TEST_CASE( "Testing wasm <i32_54_wasm>", "[i32_54_wasm_tests]" ) {
680 auto code = read_wasm( std::string(wasm_directory) + "i32.54.wasm");
681 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
682}
683
684BACKEND_TEST_CASE( "Testing wasm <i32_55_wasm>", "[i32_55_wasm_tests]" ) {
686 auto code = read_wasm( std::string(wasm_directory) + "i32.55.wasm");
687 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
688}
689
690BACKEND_TEST_CASE( "Testing wasm <i32_56_wasm>", "[i32_56_wasm_tests]" ) {
692 auto code = read_wasm( std::string(wasm_directory) + "i32.56.wasm");
693 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
694}
695
696BACKEND_TEST_CASE( "Testing wasm <i32_57_wasm>", "[i32_57_wasm_tests]" ) {
698 auto code = read_wasm( std::string(wasm_directory) + "i32.57.wasm");
699 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
700}
701
702BACKEND_TEST_CASE( "Testing wasm <i32_58_wasm>", "[i32_58_wasm_tests]" ) {
704 auto code = read_wasm( std::string(wasm_directory) + "i32.58.wasm");
705 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
706}
707
708BACKEND_TEST_CASE( "Testing wasm <i32_59_wasm>", "[i32_59_wasm_tests]" ) {
710 auto code = read_wasm( std::string(wasm_directory) + "i32.59.wasm");
711 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
712}
713
714BACKEND_TEST_CASE( "Testing wasm <i32_6_wasm>", "[i32_6_wasm_tests]" ) {
716 auto code = read_wasm( std::string(wasm_directory) + "i32.6.wasm");
717 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
718}
719
720BACKEND_TEST_CASE( "Testing wasm <i32_60_wasm>", "[i32_60_wasm_tests]" ) {
722 auto code = read_wasm( std::string(wasm_directory) + "i32.60.wasm");
723 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
724}
725
726BACKEND_TEST_CASE( "Testing wasm <i32_61_wasm>", "[i32_61_wasm_tests]" ) {
728 auto code = read_wasm( std::string(wasm_directory) + "i32.61.wasm");
729 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
730}
731
732BACKEND_TEST_CASE( "Testing wasm <i32_62_wasm>", "[i32_62_wasm_tests]" ) {
734 auto code = read_wasm( std::string(wasm_directory) + "i32.62.wasm");
735 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
736}
737
738BACKEND_TEST_CASE( "Testing wasm <i32_63_wasm>", "[i32_63_wasm_tests]" ) {
740 auto code = read_wasm( std::string(wasm_directory) + "i32.63.wasm");
741 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
742}
743
744BACKEND_TEST_CASE( "Testing wasm <i32_64_wasm>", "[i32_64_wasm_tests]" ) {
746 auto code = read_wasm( std::string(wasm_directory) + "i32.64.wasm");
747 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
748}
749
750BACKEND_TEST_CASE( "Testing wasm <i32_65_wasm>", "[i32_65_wasm_tests]" ) {
752 auto code = read_wasm( std::string(wasm_directory) + "i32.65.wasm");
753 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
754}
755
756BACKEND_TEST_CASE( "Testing wasm <i32_66_wasm>", "[i32_66_wasm_tests]" ) {
758 auto code = read_wasm( std::string(wasm_directory) + "i32.66.wasm");
759 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
760}
761
762BACKEND_TEST_CASE( "Testing wasm <i32_67_wasm>", "[i32_67_wasm_tests]" ) {
764 auto code = read_wasm( std::string(wasm_directory) + "i32.67.wasm");
765 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
766}
767
768BACKEND_TEST_CASE( "Testing wasm <i32_68_wasm>", "[i32_68_wasm_tests]" ) {
770 auto code = read_wasm( std::string(wasm_directory) + "i32.68.wasm");
771 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
772}
773
774BACKEND_TEST_CASE( "Testing wasm <i32_69_wasm>", "[i32_69_wasm_tests]" ) {
776 auto code = read_wasm( std::string(wasm_directory) + "i32.69.wasm");
777 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
778}
779
780BACKEND_TEST_CASE( "Testing wasm <i32_7_wasm>", "[i32_7_wasm_tests]" ) {
782 auto code = read_wasm( std::string(wasm_directory) + "i32.7.wasm");
783 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
784}
785
786BACKEND_TEST_CASE( "Testing wasm <i32_70_wasm>", "[i32_70_wasm_tests]" ) {
788 auto code = read_wasm( std::string(wasm_directory) + "i32.70.wasm");
789 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
790}
791
792BACKEND_TEST_CASE( "Testing wasm <i32_71_wasm>", "[i32_71_wasm_tests]" ) {
794 auto code = read_wasm( std::string(wasm_directory) + "i32.71.wasm");
795 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
796}
797
798BACKEND_TEST_CASE( "Testing wasm <i32_72_wasm>", "[i32_72_wasm_tests]" ) {
800 auto code = read_wasm( std::string(wasm_directory) + "i32.72.wasm");
801 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
802}
803
804BACKEND_TEST_CASE( "Testing wasm <i32_73_wasm>", "[i32_73_wasm_tests]" ) {
806 auto code = read_wasm( std::string(wasm_directory) + "i32.73.wasm");
807 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
808}
809
810BACKEND_TEST_CASE( "Testing wasm <i32_74_wasm>", "[i32_74_wasm_tests]" ) {
812 auto code = read_wasm( std::string(wasm_directory) + "i32.74.wasm");
813 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
814}
815
816BACKEND_TEST_CASE( "Testing wasm <i32_75_wasm>", "[i32_75_wasm_tests]" ) {
818 auto code = read_wasm( std::string(wasm_directory) + "i32.75.wasm");
819 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
820}
821
822BACKEND_TEST_CASE( "Testing wasm <i32_76_wasm>", "[i32_76_wasm_tests]" ) {
824 auto code = read_wasm( std::string(wasm_directory) + "i32.76.wasm");
825 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
826}
827
828BACKEND_TEST_CASE( "Testing wasm <i32_77_wasm>", "[i32_77_wasm_tests]" ) {
830 auto code = read_wasm( std::string(wasm_directory) + "i32.77.wasm");
831 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
832}
833
834BACKEND_TEST_CASE( "Testing wasm <i32_78_wasm>", "[i32_78_wasm_tests]" ) {
836 auto code = read_wasm( std::string(wasm_directory) + "i32.78.wasm");
837 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
838}
839
840BACKEND_TEST_CASE( "Testing wasm <i32_79_wasm>", "[i32_79_wasm_tests]" ) {
842 auto code = read_wasm( std::string(wasm_directory) + "i32.79.wasm");
843 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
844}
845
846BACKEND_TEST_CASE( "Testing wasm <i32_8_wasm>", "[i32_8_wasm_tests]" ) {
848 auto code = read_wasm( std::string(wasm_directory) + "i32.8.wasm");
849 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
850}
851
852BACKEND_TEST_CASE( "Testing wasm <i32_80_wasm>", "[i32_80_wasm_tests]" ) {
854 auto code = read_wasm( std::string(wasm_directory) + "i32.80.wasm");
855 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
856}
857
858BACKEND_TEST_CASE( "Testing wasm <i32_81_wasm>", "[i32_81_wasm_tests]" ) {
860 auto code = read_wasm( std::string(wasm_directory) + "i32.81.wasm");
861 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
862}
863
864BACKEND_TEST_CASE( "Testing wasm <i32_82_wasm>", "[i32_82_wasm_tests]" ) {
866 auto code = read_wasm( std::string(wasm_directory) + "i32.82.wasm");
867 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
868}
869
870BACKEND_TEST_CASE( "Testing wasm <i32_83_wasm>", "[i32_83_wasm_tests]" ) {
872 auto code = read_wasm( std::string(wasm_directory) + "i32.83.wasm");
873 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
874}
875
876BACKEND_TEST_CASE( "Testing wasm <i32_9_wasm>", "[i32_9_wasm_tests]" ) {
878 auto code = read_wasm( std::string(wasm_directory) + "i32.9.wasm");
879 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
880}
881
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
wasm_allocator wa
Definition main.cpp:10
#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