Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
conversions_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
14
using namespace
sysio
;
15
using namespace
sysio::vm
;
16
extern
wasm_allocator
wa
;
17
18
BACKEND_TEST_CASE
(
"Testing wasm <conversions_0_wasm>"
,
"[conversions_0_wasm_tests]"
) {
19
using
backend_t
=
backend<standalone_function_t, TestType>
;
20
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.0.wasm"
);
21
backend_t
bkend
( code, &
wa
);
22
23
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_s"
,
UINT32_C
(0))->to_ui64() ==
UINT32_C
(0));
24
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_s"
,
UINT32_C
(10000))->to_ui64() ==
UINT32_C
(10000));
25
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_s"
,
UINT32_C
(4294957296))->to_ui64() ==
UINT32_C
(18446744073709541616));
26
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_s"
,
UINT32_C
(4294967295))->to_ui64() ==
UINT32_C
(18446744073709551615));
27
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_s"
,
UINT32_C
(2147483647))->to_ui64() ==
UINT32_C
(2147483647));
28
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_s"
,
UINT32_C
(2147483648))->to_ui64() ==
UINT32_C
(18446744071562067968));
29
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_u"
,
UINT32_C
(0))->to_ui64() ==
UINT32_C
(0));
30
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_u"
,
UINT32_C
(10000))->to_ui64() ==
UINT32_C
(10000));
31
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_u"
,
UINT32_C
(4294957296))->to_ui64() ==
UINT32_C
(4294957296));
32
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_u"
,
UINT32_C
(4294967295))->to_ui64() ==
UINT32_C
(4294967295));
33
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_u"
,
UINT32_C
(2147483647))->to_ui64() ==
UINT32_C
(2147483647));
34
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.extend_i32_u"
,
UINT32_C
(2147483648))->to_ui64() ==
UINT32_C
(2147483648));
35
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(18446744073709551615))->to_ui32() ==
UINT32_C
(4294967295));
36
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(18446744073709451616))->to_ui32() ==
UINT32_C
(4294867296));
37
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(2147483648))->to_ui32() ==
UINT32_C
(2147483648));
38
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(18446744071562067967))->to_ui32() ==
UINT32_C
(2147483647));
39
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(18446744069414584320))->to_ui32() ==
UINT32_C
(0));
40
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(18446744069414584319))->to_ui32() ==
UINT32_C
(4294967295));
41
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(18446744069414584321))->to_ui32() ==
UINT32_C
(1));
42
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(0))->to_ui32() ==
UINT32_C
(0));
43
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(1311768467463790320))->to_ui32() ==
UINT32_C
(2596069104));
44
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(4294967295))->to_ui32() ==
UINT32_C
(4294967295));
45
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(4294967296))->to_ui32() ==
UINT32_C
(0));
46
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.wrap_i64"
,
UINT64_C
(4294967297))->to_ui32() ==
UINT32_C
(1));
47
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(0)))->to_ui32() ==
UINT32_C
(0));
48
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2147483648)))->to_ui32() ==
UINT32_C
(0));
49
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1)))->to_ui32() ==
UINT32_C
(0));
50
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2147483649)))->to_ui32() ==
UINT32_C
(0));
51
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1065353216)))->to_ui32() ==
UINT32_C
(1));
52
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1066192077)))->to_ui32() ==
UINT32_C
(1));
53
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1069547520)))->to_ui32() ==
UINT32_C
(1));
54
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3212836864)))->to_ui32() ==
UINT32_C
(4294967295));
55
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3213675725)))->to_ui32() ==
UINT32_C
(4294967295));
56
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3217031168)))->to_ui32() ==
UINT32_C
(4294967295));
57
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3220386611)))->to_ui32() ==
UINT32_C
(4294967295));
58
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3221225472)))->to_ui32() ==
UINT32_C
(4294967294));
59
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1325400063)))->to_ui32() ==
UINT32_C
(2147483520));
60
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3472883712)))->to_ui32() ==
UINT32_C
(2147483648));
61
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1325400064))), std::exception);
62
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3472883713))), std::exception);
63
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2139095040))), std::exception);
64
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(4286578688))), std::exception);
65
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2143289344))), std::exception);
66
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2141192192))), std::exception);
67
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(4290772992))), std::exception);
68
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(4288675840))), std::exception);
69
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(0)))->to_ui32() ==
UINT32_C
(0));
70
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2147483648)))->to_ui32() ==
UINT32_C
(0));
71
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1)))->to_ui32() ==
UINT32_C
(0));
72
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2147483649)))->to_ui32() ==
UINT32_C
(0));
73
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1065353216)))->to_ui32() ==
UINT32_C
(1));
74
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1066192077)))->to_ui32() ==
UINT32_C
(1));
75
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1069547520)))->to_ui32() ==
UINT32_C
(1));
76
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1072902963)))->to_ui32() ==
UINT32_C
(1));
77
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1073741824)))->to_ui32() ==
UINT32_C
(2));
78
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1325400064)))->to_ui32() ==
UINT32_C
(2147483648));
79
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1333788671)))->to_ui32() ==
UINT32_C
(4294967040));
80
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(3211159142)))->to_ui32() ==
UINT32_C
(0));
81
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(3212836863)))->to_ui32() ==
UINT32_C
(0));
82
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1333788672))), std::exception);
83
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(3212836864))), std::exception);
84
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2139095040))), std::exception);
85
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(4286578688))), std::exception);
86
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2143289344))), std::exception);
87
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2141192192))), std::exception);
88
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(4290772992))), std::exception);
89
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(4288675840))), std::exception);
90
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(0)))->to_ui32() ==
UINT32_C
(0));
91
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9223372036854775808)))->to_ui32() ==
UINT32_C
(0));
92
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(1)))->to_ui32() ==
UINT32_C
(0));
93
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9223372036854775809)))->to_ui32() ==
UINT32_C
(0));
94
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4607182418800017408)))->to_ui32() ==
UINT32_C
(1));
95
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4607632778762754458)))->to_ui32() ==
UINT32_C
(1));
96
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4609434218613702656)))->to_ui32() ==
UINT32_C
(1));
97
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13830554455654793216)))->to_ui32() ==
UINT32_C
(4294967295));
98
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13831004815617530266)))->to_ui32() ==
UINT32_C
(4294967295));
99
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13832806255468478464)))->to_ui32() ==
UINT32_C
(4294967295));
100
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13834607695319426662)))->to_ui32() ==
UINT32_C
(4294967295));
101
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13835058055282163712)))->to_ui32() ==
UINT32_C
(4294967294));
102
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4746794007244308480)))->to_ui32() ==
UINT32_C
(2147483647));
103
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13970166044103278592)))->to_ui32() ==
UINT32_C
(2147483648));
104
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4746794007248502784))), std::exception);
105
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13970166044105375744))), std::exception);
106
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9218868437227405312))), std::exception);
107
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(18442240474082181120))), std::exception);
108
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9221120237041090560))), std::exception);
109
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9219994337134247936))), std::exception);
110
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(18444492273895866368))), std::exception);
111
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(18443366373989023744))), std::exception);
112
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(0)))->to_ui32() ==
UINT32_C
(0));
113
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9223372036854775808)))->to_ui32() ==
UINT32_C
(0));
114
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(1)))->to_ui32() ==
UINT32_C
(0));
115
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9223372036854775809)))->to_ui32() ==
UINT32_C
(0));
116
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4607182418800017408)))->to_ui32() ==
UINT32_C
(1));
117
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4607632778762754458)))->to_ui32() ==
UINT32_C
(1));
118
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4609434218613702656)))->to_ui32() ==
UINT32_C
(1));
119
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4611235658464650854)))->to_ui32() ==
UINT32_C
(1));
120
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4611686018427387904)))->to_ui32() ==
UINT32_C
(2));
121
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4746794007248502784)))->to_ui32() ==
UINT32_C
(2147483648));
122
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4751297606873776128)))->to_ui32() ==
UINT32_C
(4294967295));
123
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(13829653735729319117)))->to_ui32() ==
UINT32_C
(0));
124
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(13830554455654793215)))->to_ui32() ==
UINT32_C
(0));
125
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4726483295884279808)))->to_ui32() ==
UINT32_C
(100000000));
126
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4751297606875873280))), std::exception);
127
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(13830554455654793216))), std::exception);
128
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4846369599423283200))), std::exception);
129
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(5055640609639927018))), std::exception);
130
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4890909195324358656))), std::exception);
131
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9218868437227405312))), std::exception);
132
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(18442240474082181120))), std::exception);
133
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9221120237041090560))), std::exception);
134
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9219994337134247936))), std::exception);
135
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(18444492273895866368))), std::exception);
136
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i32.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(18443366373989023744))), std::exception);
137
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(0)))->to_ui64() ==
UINT32_C
(0));
138
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2147483648)))->to_ui64() ==
UINT32_C
(0));
139
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1)))->to_ui64() ==
UINT32_C
(0));
140
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2147483649)))->to_ui64() ==
UINT32_C
(0));
141
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1065353216)))->to_ui64() ==
UINT32_C
(1));
142
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1066192077)))->to_ui64() ==
UINT32_C
(1));
143
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1069547520)))->to_ui64() ==
UINT32_C
(1));
144
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3212836864)))->to_ui64() ==
UINT32_C
(18446744073709551615));
145
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3213675725)))->to_ui64() ==
UINT32_C
(18446744073709551615));
146
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3217031168)))->to_ui64() ==
UINT32_C
(18446744073709551615));
147
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3220386611)))->to_ui64() ==
UINT32_C
(18446744073709551615));
148
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3221225472)))->to_ui64() ==
UINT32_C
(18446744073709551614));
149
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1333788672)))->to_ui64() ==
UINT32_C
(4294967296));
150
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3481272320)))->to_ui64() ==
UINT32_C
(18446744069414584320));
151
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1593835519)))->to_ui64() ==
UINT32_C
(9223371487098961920));
152
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3741319168)))->to_ui64() ==
UINT32_C
(9223372036854775808));
153
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(1593835520))), std::exception);
154
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(3741319169))), std::exception);
155
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2139095040))), std::exception);
156
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(4286578688))), std::exception);
157
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2143289344))), std::exception);
158
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(2141192192))), std::exception);
159
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(4290772992))), std::exception);
160
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_s"
,
bit_cast<float>
(
UINT32_C
(4288675840))), std::exception);
161
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(0)))->to_ui64() ==
UINT32_C
(0));
162
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2147483648)))->to_ui64() ==
UINT32_C
(0));
163
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1)))->to_ui64() ==
UINT32_C
(0));
164
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2147483649)))->to_ui64() ==
UINT32_C
(0));
165
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1065353216)))->to_ui64() ==
UINT32_C
(1));
166
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1066192077)))->to_ui64() ==
UINT32_C
(1));
167
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1069547520)))->to_ui64() ==
UINT32_C
(1));
168
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1333788672)))->to_ui64() ==
UINT32_C
(4294967296));
169
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1602224127)))->to_ui64() ==
UINT32_C
(18446742974197923840));
170
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(3211159142)))->to_ui64() ==
UINT32_C
(0));
171
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(3212836863)))->to_ui64() ==
UINT32_C
(0));
172
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(1602224128))), std::exception);
173
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(3212836864))), std::exception);
174
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2139095040))), std::exception);
175
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(4286578688))), std::exception);
176
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2143289344))), std::exception);
177
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(2141192192))), std::exception);
178
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(4290772992))), std::exception);
179
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f32_u"
,
bit_cast<float>
(
UINT32_C
(4288675840))), std::exception);
180
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(0)))->to_ui64() ==
UINT32_C
(0));
181
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9223372036854775808)))->to_ui64() ==
UINT32_C
(0));
182
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(1)))->to_ui64() ==
UINT32_C
(0));
183
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9223372036854775809)))->to_ui64() ==
UINT32_C
(0));
184
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4607182418800017408)))->to_ui64() ==
UINT32_C
(1));
185
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4607632778762754458)))->to_ui64() ==
UINT32_C
(1));
186
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4609434218613702656)))->to_ui64() ==
UINT32_C
(1));
187
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13830554455654793216)))->to_ui64() ==
UINT32_C
(18446744073709551615));
188
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13831004815617530266)))->to_ui64() ==
UINT32_C
(18446744073709551615));
189
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13832806255468478464)))->to_ui64() ==
UINT32_C
(18446744073709551615));
190
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13834607695319426662)))->to_ui64() ==
UINT32_C
(18446744073709551615));
191
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13835058055282163712)))->to_ui64() ==
UINT32_C
(18446744073709551614));
192
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4751297606875873280)))->to_ui64() ==
UINT32_C
(4294967296));
193
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(13974669643730649088)))->to_ui64() ==
UINT32_C
(18446744069414584320));
194
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4890909195324358655)))->to_ui64() ==
UINT32_C
(9223372036854774784));
195
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(14114281232179134464)))->to_ui64() ==
UINT32_C
(9223372036854775808));
196
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(4890909195324358656))), std::exception);
197
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(14114281232179134465))), std::exception);
198
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9218868437227405312))), std::exception);
199
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(18442240474082181120))), std::exception);
200
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9221120237041090560))), std::exception);
201
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(9219994337134247936))), std::exception);
202
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(18444492273895866368))), std::exception);
203
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_s"
,
bit_cast<double>
(
UINT64_C
(18443366373989023744))), std::exception);
204
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(0)))->to_ui64() ==
UINT32_C
(0));
205
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9223372036854775808)))->to_ui64() ==
UINT32_C
(0));
206
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(1)))->to_ui64() ==
UINT32_C
(0));
207
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9223372036854775809)))->to_ui64() ==
UINT32_C
(0));
208
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4607182418800017408)))->to_ui64() ==
UINT32_C
(1));
209
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4607632778762754458)))->to_ui64() ==
UINT32_C
(1));
210
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4609434218613702656)))->to_ui64() ==
UINT32_C
(1));
211
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4751297606873776128)))->to_ui64() ==
UINT32_C
(4294967295));
212
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4751297606875873280)))->to_ui64() ==
UINT32_C
(4294967296));
213
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4895412794951729151)))->to_ui64() ==
UINT32_C
(18446744073709549568));
214
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(13829653735729319117)))->to_ui64() ==
UINT32_C
(0));
215
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(13830554455654793215)))->to_ui64() ==
UINT32_C
(0));
216
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4726483295884279808)))->to_ui64() ==
UINT32_C
(100000000));
217
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4846369599423283200)))->to_ui64() ==
UINT32_C
(10000000000000000));
218
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4890909195324358656)))->to_ui64() ==
UINT32_C
(9223372036854775808));
219
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(4895412794951729152))), std::exception);
220
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(13830554455654793216))), std::exception);
221
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9218868437227405312))), std::exception);
222
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(18442240474082181120))), std::exception);
223
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9221120237041090560))), std::exception);
224
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(9219994337134247936))), std::exception);
225
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(18444492273895866368))), std::exception);
226
CHECK_THROWS_AS
(
bkend
(
"env"
,
"i64.trunc_f64_u"
,
bit_cast<double>
(
UINT64_C
(18443366373989023744))), std::exception);
227
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(1))->to_f32()) ==
UINT32_C
(1065353216));
228
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(4294967295))->to_f32()) ==
UINT32_C
(3212836864));
229
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(0))->to_f32()) ==
UINT32_C
(0));
230
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(2147483647))->to_f32()) ==
UINT32_C
(1325400064));
231
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(2147483648))->to_f32()) ==
UINT32_C
(3472883712));
232
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(1234567890))->to_f32()) ==
UINT32_C
(1318267910));
233
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(16777217))->to_f32()) ==
UINT32_C
(1266679808));
234
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(4278190079))->to_f32()) ==
UINT32_C
(3414163456));
235
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(16777219))->to_f32()) ==
UINT32_C
(1266679810));
236
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_s"
,
UINT32_C
(4278190077))->to_f32()) ==
UINT32_C
(3414163458));
237
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(1))->to_f32()) ==
UINT32_C
(1065353216));
238
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(18446744073709551615))->to_f32()) ==
UINT32_C
(3212836864));
239
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(0))->to_f32()) ==
UINT32_C
(0));
240
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(9223372036854775807))->to_f32()) ==
UINT32_C
(1593835520));
241
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(9223372036854775808))->to_f32()) ==
UINT32_C
(3741319168));
242
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(314159265358979))->to_f32()) ==
UINT32_C
(1468980468));
243
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(16777217))->to_f32()) ==
UINT32_C
(1266679808));
244
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(18446744073692774399))->to_f32()) ==
UINT32_C
(3414163456));
245
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(16777219))->to_f32()) ==
UINT32_C
(1266679810));
246
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(18446744073692774397))->to_f32()) ==
UINT32_C
(3414163458));
247
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(9223371212221054977))->to_f32()) ==
UINT32_C
(1593835519));
248
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(9223372311732682753))->to_f32()) ==
UINT32_C
(3741319167));
249
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(9007199791611905))->to_f32()) ==
UINT32_C
(1509949441));
250
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_s"
,
UINT64_C
(18437736873917939711))->to_f32()) ==
UINT32_C
(3657433089));
251
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_s"
,
UINT32_C
(1))->to_f64()) ==
UINT64_C
(4607182418800017408));
252
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_s"
,
UINT32_C
(4294967295))->to_f64()) ==
UINT64_C
(13830554455654793216));
253
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_s"
,
UINT32_C
(0))->to_f64()) ==
UINT64_C
(0));
254
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_s"
,
UINT32_C
(2147483647))->to_f64()) ==
UINT64_C
(4746794007244308480));
255
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_s"
,
UINT32_C
(2147483648))->to_f64()) ==
UINT64_C
(13970166044103278592));
256
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_s"
,
UINT32_C
(987654321))->to_f64()) ==
UINT64_C
(4741568253304766464));
257
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(1))->to_f64()) ==
UINT64_C
(4607182418800017408));
258
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(18446744073709551615))->to_f64()) ==
UINT64_C
(13830554455654793216));
259
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(0))->to_f64()) ==
UINT64_C
(0));
260
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(9223372036854775807))->to_f64()) ==
UINT64_C
(4890909195324358656));
261
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(9223372036854775808))->to_f64()) ==
UINT64_C
(14114281232179134464));
262
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(4669201609102990))->to_f64()) ==
UINT64_C
(4841535201405015694));
263
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(9007199254740993))->to_f64()) ==
UINT64_C
(4845873199050653696));
264
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(18437736874454810623))->to_f64()) ==
UINT64_C
(14069245235905429504));
265
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(9007199254740995))->to_f64()) ==
UINT64_C
(4845873199050653698));
266
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_s"
,
UINT64_C
(18437736874454810621))->to_f64()) ==
UINT64_C
(14069245235905429506));
267
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(1))->to_f32()) ==
UINT32_C
(1065353216));
268
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(0))->to_f32()) ==
UINT32_C
(0));
269
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(2147483647))->to_f32()) ==
UINT32_C
(1325400064));
270
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(2147483648))->to_f32()) ==
UINT32_C
(1325400064));
271
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(305419896))->to_f32()) ==
UINT32_C
(1301390004));
272
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(4294967295))->to_f32()) ==
UINT32_C
(1333788672));
273
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(2147483776))->to_f32()) ==
UINT32_C
(1325400064));
274
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(2147483777))->to_f32()) ==
UINT32_C
(1325400065));
275
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(2147483778))->to_f32()) ==
UINT32_C
(1325400065));
276
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(4294966912))->to_f32()) ==
UINT32_C
(1333788670));
277
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(4294966913))->to_f32()) ==
UINT32_C
(1333788671));
278
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(4294966914))->to_f32()) ==
UINT32_C
(1333788671));
279
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(16777217))->to_f32()) ==
UINT32_C
(1266679808));
280
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i32_u"
,
UINT32_C
(16777219))->to_f32()) ==
UINT32_C
(1266679810));
281
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(1))->to_f32()) ==
UINT32_C
(1065353216));
282
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(0))->to_f32()) ==
UINT32_C
(0));
283
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(9223372036854775807))->to_f32()) ==
UINT32_C
(1593835520));
284
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(9223372036854775808))->to_f32()) ==
UINT32_C
(1593835520));
285
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(18446744073709551615))->to_f32()) ==
UINT32_C
(1602224128));
286
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(16777217))->to_f32()) ==
UINT32_C
(1266679808));
287
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(16777219))->to_f32()) ==
UINT32_C
(1266679810));
288
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(9007199791611905))->to_f32()) ==
UINT32_C
(1509949441));
289
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(9223371761976868863))->to_f32()) ==
UINT32_C
(1593835519));
290
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(9223372586610589697))->to_f32()) ==
UINT32_C
(1593835521));
291
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.convert_i64_u"
,
UINT64_C
(18446742424442109953))->to_f32()) ==
UINT32_C
(1602224127));
292
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_u"
,
UINT32_C
(1))->to_f64()) ==
UINT64_C
(4607182418800017408));
293
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_u"
,
UINT32_C
(0))->to_f64()) ==
UINT64_C
(0));
294
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_u"
,
UINT32_C
(2147483647))->to_f64()) ==
UINT64_C
(4746794007244308480));
295
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_u"
,
UINT32_C
(2147483648))->to_f64()) ==
UINT64_C
(4746794007248502784));
296
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i32_u"
,
UINT32_C
(4294967295))->to_f64()) ==
UINT64_C
(4751297606873776128));
297
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(1))->to_f64()) ==
UINT64_C
(4607182418800017408));
298
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(0))->to_f64()) ==
UINT64_C
(0));
299
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(9223372036854775807))->to_f64()) ==
UINT64_C
(4890909195324358656));
300
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(9223372036854775808))->to_f64()) ==
UINT64_C
(4890909195324358656));
301
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(18446744073709551615))->to_f64()) ==
UINT64_C
(4895412794951729152));
302
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(9223372036854776832))->to_f64()) ==
UINT64_C
(4890909195324358656));
303
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(9223372036854776833))->to_f64()) ==
UINT64_C
(4890909195324358657));
304
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(9223372036854776834))->to_f64()) ==
UINT64_C
(4890909195324358657));
305
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(18446744073709548544))->to_f64()) ==
UINT64_C
(4895412794951729150));
306
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(18446744073709548545))->to_f64()) ==
UINT64_C
(4895412794951729151));
307
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(18446744073709548546))->to_f64()) ==
UINT64_C
(4895412794951729151));
308
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(9007199254740993))->to_f64()) ==
UINT64_C
(4845873199050653696));
309
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.convert_i64_u"
,
UINT64_C
(9007199254740995))->to_f64()) ==
UINT64_C
(4845873199050653698));
310
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(0)))->to_f64()) ==
UINT64_C
(0));
311
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(2147483648)))->to_f64()) ==
UINT64_C
(9223372036854775808));
312
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(1)))->to_f64()) ==
UINT64_C
(3936146074321813504));
313
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(2147483649)))->to_f64()) ==
UINT64_C
(13159518111176589312));
314
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(1065353216)))->to_f64()) ==
UINT64_C
(4607182418800017408));
315
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(3212836864)))->to_f64()) ==
UINT64_C
(13830554455654793216));
316
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(4286578687)))->to_f64()) ==
UINT64_C
(14407015207421345792));
317
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(2139095039)))->to_f64()) ==
UINT64_C
(5183643170566569984));
318
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(67108864)))->to_f64()) ==
UINT64_C
(4071254063142928384));
319
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(2118632255)))->to_f64()) ==
UINT64_C
(5172657297058430976));
320
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(2139095040)))->to_f64()) ==
UINT64_C
(9218868437227405312));
321
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(4286578688)))->to_f64()) ==
UINT64_C
(18442240474082181120));
322
CHECK
(
check_nan
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(2143289344)))));
323
CHECK
(
check_nan
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(2141192192)))));
324
CHECK
(
check_nan
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(4290772992)))));
325
CHECK
(
check_nan
(
bkend
.
call_with_return
(
"env"
,
"f64.promote_f32"
,
bit_cast<float>
(
UINT32_C
(4288675840)))));
326
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(0)))->to_f32()) ==
UINT32_C
(0));
327
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(9223372036854775808)))->to_f32()) ==
UINT32_C
(2147483648));
328
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(1)))->to_f32()) ==
UINT32_C
(0));
329
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(9223372036854775809)))->to_f32()) ==
UINT32_C
(2147483648));
330
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4607182418800017408)))->to_f32()) ==
UINT32_C
(1065353216));
331
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(13830554455654793216)))->to_f32()) ==
UINT32_C
(3212836864));
332
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4039728865214464000)))->to_f32()) ==
UINT32_C
(8388608));
333
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(13263100902069239808)))->to_f32()) ==
UINT32_C
(2155872256));
334
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4039728865214463999)))->to_f32()) ==
UINT32_C
(8388607));
335
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(13263100902069239807)))->to_f32()) ==
UINT32_C
(2155872255));
336
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(3936146074321813504)))->to_f32()) ==
UINT32_C
(1));
337
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(13159518111176589312)))->to_f32()) ==
UINT32_C
(2147483649));
338
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(5183643170298134528)))->to_f32()) ==
UINT32_C
(2139095038));
339
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(14407015207152910336)))->to_f32()) ==
UINT32_C
(4286578686));
340
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(5183643170298134529)))->to_f32()) ==
UINT32_C
(2139095039));
341
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(14407015207152910337)))->to_f32()) ==
UINT32_C
(4286578687));
342
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(5183643170566569984)))->to_f32()) ==
UINT32_C
(2139095039));
343
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(14407015207421345792)))->to_f32()) ==
UINT32_C
(4286578687));
344
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(5183643170835005439)))->to_f32()) ==
UINT32_C
(2139095039));
345
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(14407015207689781247)))->to_f32()) ==
UINT32_C
(4286578687));
346
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(5183643170835005440)))->to_f32()) ==
UINT32_C
(2139095040));
347
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(14407015207689781248)))->to_f32()) ==
UINT32_C
(4286578688));
348
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4071254063142928384)))->to_f32()) ==
UINT32_C
(67108864));
349
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(5172657297058430976)))->to_f32()) ==
UINT32_C
(2118632255));
350
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(9218868437227405312)))->to_f32()) ==
UINT32_C
(2139095040));
351
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(18442240474082181120)))->to_f32()) ==
UINT32_C
(4286578688));
352
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4607182418800017409)))->to_f32()) ==
UINT32_C
(1065353216));
353
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4607182418800017407)))->to_f32()) ==
UINT32_C
(1065353216));
354
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4607182419068452864)))->to_f32()) ==
UINT32_C
(1065353216));
355
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4607182419068452865)))->to_f32()) ==
UINT32_C
(1065353217));
356
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4607182419605323775)))->to_f32()) ==
UINT32_C
(1065353217));
357
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4607182419605323776)))->to_f32()) ==
UINT32_C
(1065353218));
358
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4607182420142194688)))->to_f32()) ==
UINT32_C
(1065353218));
359
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4715268810125344768)))->to_f32()) ==
UINT32_C
(1266679808));
360
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4715268810125344769)))->to_f32()) ==
UINT32_C
(1266679809));
361
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4715268810662215679)))->to_f32()) ==
UINT32_C
(1266679809));
362
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4715268810662215680)))->to_f32()) ==
UINT32_C
(1266679810));
363
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(5094955347580439664)))->to_f32()) ==
UINT32_C
(1973901096));
364
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4101111194527827589)))->to_f32()) ==
UINT32_C
(122722105));
365
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4038806939559600639)))->to_f32()) ==
UINT32_C
(7529997));
366
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(13836913116900734306)))->to_f32()) ==
UINT32_C
(3224680794));
367
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(14338315240173327556)))->to_f32()) ==
UINT32_C
(4158615026));
368
CHECK
(
check_nan
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(9221120237041090560)))));
369
CHECK
(
check_nan
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(9219994337134247936)))));
370
CHECK
(
check_nan
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(18444492273895866368)))));
371
CHECK
(
check_nan
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(18443366373989023744)))));
372
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(4503599627370496)))->to_f32()) ==
UINT32_C
(0));
373
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(9227875636482146304)))->to_f32()) ==
UINT32_C
(2147483648));
374
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(3931642474694443008)))->to_f32()) ==
UINT32_C
(0));
375
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(13155014511549218816)))->to_f32()) ==
UINT32_C
(2147483648));
376
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(3931642474694443009)))->to_f32()) ==
UINT32_C
(1));
377
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.demote_f64"
,
bit_cast<double>
(
UINT64_C
(13155014511549218817)))->to_f32()) ==
UINT32_C
(2147483649));
378
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(0))->to_f32()) ==
UINT32_C
(0));
379
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(2147483648))->to_f32()) ==
UINT32_C
(2147483648));
380
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(1))->to_f32()) ==
UINT32_C
(1));
381
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(4294967295))->to_f32()) ==
UINT32_C
(4294967295));
382
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(123456789))->to_f32()) ==
UINT32_C
(123456789));
383
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(2147483649))->to_f32()) ==
UINT32_C
(2147483649));
384
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(2139095040))->to_f32()) ==
UINT32_C
(2139095040));
385
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(4286578688))->to_f32()) ==
UINT32_C
(4286578688));
386
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(2143289344))->to_f32()) ==
UINT32_C
(2143289344));
387
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(4290772992))->to_f32()) ==
UINT32_C
(4290772992));
388
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(2141192192))->to_f32()) ==
UINT32_C
(2141192192));
389
CHECK
(
bit_cast<uint32_t>
(
bkend
.
call_with_return
(
"env"
,
"f32.reinterpret_i32"
,
UINT32_C
(4288675840))->to_f32()) ==
UINT32_C
(4288675840));
390
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(0))->to_f64()) ==
UINT64_C
(0));
391
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(1))->to_f64()) ==
UINT64_C
(1));
392
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(18446744073709551615))->to_f64()) ==
UINT64_C
(18446744073709551615));
393
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(9223372036854775808))->to_f64()) ==
UINT64_C
(9223372036854775808));
394
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(1234567890))->to_f64()) ==
UINT64_C
(1234567890));
395
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(9223372036854775809))->to_f64()) ==
UINT64_C
(9223372036854775809));
396
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(9218868437227405312))->to_f64()) ==
UINT64_C
(9218868437227405312));
397
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(18442240474082181120))->to_f64()) ==
UINT64_C
(18442240474082181120));
398
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(9221120237041090560))->to_f64()) ==
UINT64_C
(9221120237041090560));
399
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(18444492273895866368))->to_f64()) ==
UINT64_C
(18444492273895866368));
400
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(9219994337134247936))->to_f64()) ==
UINT64_C
(9219994337134247936));
401
CHECK
(
bit_cast<uint64_t>
(
bkend
.
call_with_return
(
"env"
,
"f64.reinterpret_i64"
,
UINT64_C
(18443366373989023744))->to_f64()) ==
UINT64_C
(18443366373989023744));
402
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(0)))->to_ui32() ==
UINT32_C
(0));
403
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(2147483648)))->to_ui32() ==
UINT32_C
(2147483648));
404
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(1)))->to_ui32() ==
UINT32_C
(1));
405
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(4294967295)))->to_ui32() ==
UINT32_C
(4294967295));
406
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(2147483649)))->to_ui32() ==
UINT32_C
(2147483649));
407
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(1065353216)))->to_ui32() ==
UINT32_C
(1065353216));
408
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(1078530010)))->to_ui32() ==
UINT32_C
(1078530010));
409
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(2139095039)))->to_ui32() ==
UINT32_C
(2139095039));
410
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(4286578687)))->to_ui32() ==
UINT32_C
(4286578687));
411
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(2139095040)))->to_ui32() ==
UINT32_C
(2139095040));
412
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(4286578688)))->to_ui32() ==
UINT32_C
(4286578688));
413
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(2143289344)))->to_ui32() ==
UINT32_C
(2143289344));
414
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(4290772992)))->to_ui32() ==
UINT32_C
(4290772992));
415
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(2141192192)))->to_ui32() ==
UINT32_C
(2141192192));
416
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i32.reinterpret_f32"
,
bit_cast<float>
(
UINT32_C
(4288675840)))->to_ui32() ==
UINT32_C
(4288675840));
417
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(0)))->to_ui64() ==
UINT32_C
(0));
418
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(9223372036854775808)))->to_ui64() ==
UINT32_C
(9223372036854775808));
419
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(1)))->to_ui64() ==
UINT32_C
(1));
420
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(18446744073709551615)))->to_ui64() ==
UINT32_C
(18446744073709551615));
421
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(9223372036854775809)))->to_ui64() ==
UINT32_C
(9223372036854775809));
422
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(4607182418800017408)))->to_ui64() ==
UINT32_C
(4607182418800017408));
423
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(4614256656552045841)))->to_ui64() ==
UINT32_C
(4614256656552045841));
424
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(9218868437227405311)))->to_ui64() ==
UINT32_C
(9218868437227405311));
425
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(18442240474082181119)))->to_ui64() ==
UINT32_C
(18442240474082181119));
426
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(9218868437227405312)))->to_ui64() ==
UINT32_C
(9218868437227405312));
427
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(18442240474082181120)))->to_ui64() ==
UINT32_C
(18442240474082181120));
428
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(9221120237041090560)))->to_ui64() ==
UINT32_C
(9221120237041090560));
429
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(18444492273895866368)))->to_ui64() ==
UINT32_C
(18444492273895866368));
430
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(9219994337134247936)))->to_ui64() ==
UINT32_C
(9219994337134247936));
431
CHECK
(
bkend
.
call_with_return
(
"env"
,
"i64.reinterpret_f64"
,
bit_cast<double>
(
UINT64_C
(18443366373989023744)))->to_ui64() ==
UINT32_C
(18443366373989023744));
432
}
433
434
BACKEND_TEST_CASE
(
"Testing wasm <conversions_1_wasm>"
,
"[conversions_1_wasm_tests]"
) {
435
using
backend_t
=
backend<standalone_function_t, TestType>
;
436
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.1.wasm"
);
437
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
438
}
439
440
BACKEND_TEST_CASE
(
"Testing wasm <conversions_10_wasm>"
,
"[conversions_10_wasm_tests]"
) {
441
using
backend_t
=
backend<standalone_function_t, TestType>
;
442
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.10.wasm"
);
443
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
444
}
445
446
BACKEND_TEST_CASE
(
"Testing wasm <conversions_11_wasm>"
,
"[conversions_11_wasm_tests]"
) {
447
using
backend_t
=
backend<standalone_function_t, TestType>
;
448
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.11.wasm"
);
449
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
450
}
451
452
BACKEND_TEST_CASE
(
"Testing wasm <conversions_12_wasm>"
,
"[conversions_12_wasm_tests]"
) {
453
using
backend_t
=
backend<standalone_function_t, TestType>
;
454
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.12.wasm"
);
455
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
456
}
457
458
BACKEND_TEST_CASE
(
"Testing wasm <conversions_13_wasm>"
,
"[conversions_13_wasm_tests]"
) {
459
using
backend_t
=
backend<standalone_function_t, TestType>
;
460
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.13.wasm"
);
461
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
462
}
463
464
BACKEND_TEST_CASE
(
"Testing wasm <conversions_14_wasm>"
,
"[conversions_14_wasm_tests]"
) {
465
using
backend_t
=
backend<standalone_function_t, TestType>
;
466
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.14.wasm"
);
467
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
468
}
469
470
BACKEND_TEST_CASE
(
"Testing wasm <conversions_15_wasm>"
,
"[conversions_15_wasm_tests]"
) {
471
using
backend_t
=
backend<standalone_function_t, TestType>
;
472
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.15.wasm"
);
473
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
474
}
475
476
BACKEND_TEST_CASE
(
"Testing wasm <conversions_16_wasm>"
,
"[conversions_16_wasm_tests]"
) {
477
using
backend_t
=
backend<standalone_function_t, TestType>
;
478
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.16.wasm"
);
479
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
480
}
481
482
BACKEND_TEST_CASE
(
"Testing wasm <conversions_17_wasm>"
,
"[conversions_17_wasm_tests]"
) {
483
using
backend_t
=
backend<standalone_function_t, TestType>
;
484
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.17.wasm"
);
485
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
486
}
487
488
BACKEND_TEST_CASE
(
"Testing wasm <conversions_18_wasm>"
,
"[conversions_18_wasm_tests]"
) {
489
using
backend_t
=
backend<standalone_function_t, TestType>
;
490
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.18.wasm"
);
491
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
492
}
493
494
BACKEND_TEST_CASE
(
"Testing wasm <conversions_19_wasm>"
,
"[conversions_19_wasm_tests]"
) {
495
using
backend_t
=
backend<standalone_function_t, TestType>
;
496
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.19.wasm"
);
497
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
498
}
499
500
BACKEND_TEST_CASE
(
"Testing wasm <conversions_2_wasm>"
,
"[conversions_2_wasm_tests]"
) {
501
using
backend_t
=
backend<standalone_function_t, TestType>
;
502
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.2.wasm"
);
503
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
504
}
505
506
BACKEND_TEST_CASE
(
"Testing wasm <conversions_20_wasm>"
,
"[conversions_20_wasm_tests]"
) {
507
using
backend_t
=
backend<standalone_function_t, TestType>
;
508
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.20.wasm"
);
509
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
510
}
511
512
BACKEND_TEST_CASE
(
"Testing wasm <conversions_21_wasm>"
,
"[conversions_21_wasm_tests]"
) {
513
using
backend_t
=
backend<standalone_function_t, TestType>
;
514
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.21.wasm"
);
515
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
516
}
517
518
BACKEND_TEST_CASE
(
"Testing wasm <conversions_22_wasm>"
,
"[conversions_22_wasm_tests]"
) {
519
using
backend_t
=
backend<standalone_function_t, TestType>
;
520
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.22.wasm"
);
521
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
522
}
523
524
BACKEND_TEST_CASE
(
"Testing wasm <conversions_23_wasm>"
,
"[conversions_23_wasm_tests]"
) {
525
using
backend_t
=
backend<standalone_function_t, TestType>
;
526
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.23.wasm"
);
527
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
528
}
529
530
BACKEND_TEST_CASE
(
"Testing wasm <conversions_24_wasm>"
,
"[conversions_24_wasm_tests]"
) {
531
using
backend_t
=
backend<standalone_function_t, TestType>
;
532
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.24.wasm"
);
533
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
534
}
535
536
BACKEND_TEST_CASE
(
"Testing wasm <conversions_25_wasm>"
,
"[conversions_25_wasm_tests]"
) {
537
using
backend_t
=
backend<standalone_function_t, TestType>
;
538
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.25.wasm"
);
539
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
540
}
541
542
BACKEND_TEST_CASE
(
"Testing wasm <conversions_3_wasm>"
,
"[conversions_3_wasm_tests]"
) {
543
using
backend_t
=
backend<standalone_function_t, TestType>
;
544
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.3.wasm"
);
545
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
546
}
547
548
BACKEND_TEST_CASE
(
"Testing wasm <conversions_4_wasm>"
,
"[conversions_4_wasm_tests]"
) {
549
using
backend_t
=
backend<standalone_function_t, TestType>
;
550
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.4.wasm"
);
551
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
552
}
553
554
BACKEND_TEST_CASE
(
"Testing wasm <conversions_5_wasm>"
,
"[conversions_5_wasm_tests]"
) {
555
using
backend_t
=
backend<standalone_function_t, TestType>
;
556
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.5.wasm"
);
557
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
558
}
559
560
BACKEND_TEST_CASE
(
"Testing wasm <conversions_6_wasm>"
,
"[conversions_6_wasm_tests]"
) {
561
using
backend_t
=
backend<standalone_function_t, TestType>
;
562
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.6.wasm"
);
563
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
564
}
565
566
BACKEND_TEST_CASE
(
"Testing wasm <conversions_7_wasm>"
,
"[conversions_7_wasm_tests]"
) {
567
using
backend_t
=
backend<standalone_function_t, TestType>
;
568
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.7.wasm"
);
569
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
570
}
571
572
BACKEND_TEST_CASE
(
"Testing wasm <conversions_8_wasm>"
,
"[conversions_8_wasm_tests]"
) {
573
using
backend_t
=
backend<standalone_function_t, TestType>
;
574
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.8.wasm"
);
575
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
576
}
577
578
BACKEND_TEST_CASE
(
"Testing wasm <conversions_9_wasm>"
,
"[conversions_9_wasm_tests]"
) {
579
using
backend_t
=
backend<standalone_function_t, TestType>
;
580
auto
code =
read_wasm
( std::string(wasm_directory) +
"conversions.9.wasm"
);
581
CHECK_THROWS_AS
(
backend_t
(code,
nullptr
), std::exception);
582
}
583
sysio::vm::backend
Definition
backend.hpp:62
sysio::vm::backend::call_with_return
auto call_with_return(host_t &host, const std::string_view &mod, const std::string_view &func, Args... args)
Definition
backend.hpp:178
sysio::vm::wasm_allocator
Definition
allocator.hpp:409
wa
wasm_allocator wa
Definition
main.cpp:10
CHECK
#define CHECK(cond)
Definition
util.h:80
bkend
backend_t bkend(hello_wasm, ehm, &wa)
backend_t
sysio::vm::backend< rhf_t > backend_t
Definition
hello_driver.cpp:61
CHECK_THROWS_AS
#define CHECK_THROWS_AS(expr, exceptionType)
Definition
catch.hpp:203
sysio::vm
Definition
controller.hpp:23
sysio::vm::read_wasm
std::vector< uint8_t > read_wasm(const std::string &fname)
Definition
utils.hpp:30
sysio
Definition
abi_serializer.cpp:8
catch.hpp
UINT32_C
#define UINT32_C(val)
Definition
stdint.h:283
UINT64_C
#define UINT64_C(val)
Definition
stdint.h:284
check_nan
bool check_nan(const std::optional< sysio::vm::operand_stack_elem > &v)
Definition
utils.hpp:43
BACKEND_TEST_CASE
#define BACKEND_TEST_CASE(name, tags)
Definition
utils.hpp:59
bit_cast
T bit_cast(const U &u)
Definition
utils.hpp:35
wasm_config.hpp
libraries
sys-vm
tests
spec
conversions_tests.cpp
Generated by
1.12.0