1#include <sysio/vm/backend.hpp>
19std::vector<uint8_t> mem_no_max_wasm = {
20 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xFE,
29std::vector<uint8_t> mem_max_wasm = {
30 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x05, 0x05, 0x01, 0xFF,
39std::vector<uint8_t> table_no_max_wasm = {
40 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x04, 0x05, 0x01, 0x70,
49std::vector<uint8_t> table_max_wasm = {
50 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x04, 0x06, 0x01, 0x70,
51 0xFF, 0x7F, 0x01, 0x02
54struct empty_options {};
55struct static_options_false {
56 static constexpr bool allow_u32_limits_flags =
false;
58struct static_options_true {
59 static constexpr bool allow_u32_limits_flags =
true;
61struct dynamic_options {
62 bool allow_u32_limits_flags;
83BACKEND_TEST_CASE(
"Test allow_u32_limits_flags static fail",
"[allow_u32_limits_flags_test]") {
91BACKEND_TEST_CASE(
"Test allow_u32_limits_flags static pass",
"[allow_u32_limits_flags_test]") {
95 backend_t backend_table_no_max(table_no_max_wasm, &
wa);
99BACKEND_TEST_CASE(
"Test allow_u32_limits_flags dynamic fail",
"[allow_u32_limits_flags_test]") {
109 backend_t backend_mem_max(mem_max_wasm,
nullptr, dynamic_options{
true});
110 backend_t backend_mem_no_max(mem_no_max_wasm,
nullptr, dynamic_options{
true});
111 backend_t backend_table_max(table_max_wasm,
nullptr, dynamic_options{
true});
112 backend_t backend_table_no_max(table_no_max_wasm,
nullptr, dynamic_options{
true});
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
#define BACKEND_TEST_CASE(name, tags)