Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
allow_u32_limits_flags_tests.cpp File Reference
#include <sysio/vm/backend.hpp>
#include "utils.hpp"
#include <catch2/catch.hpp>
Include dependency graph for allow_u32_limits_flags_tests.cpp:

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Test allow_u32_limits_flags default", "[allow_u32_limits_flags_test]")
 
 BACKEND_TEST_CASE ("Test allow_u32_limits_flags empty", "[allow_u32_limits_flags_test]")
 
 BACKEND_TEST_CASE ("Test allow_u32_limits_flags static fail", "[allow_u32_limits_flags_test]")
 
 BACKEND_TEST_CASE ("Test allow_u32_limits_flags static pass", "[allow_u32_limits_flags_test]")
 
 BACKEND_TEST_CASE ("Test allow_u32_limits_flags dynamic fail", "[allow_u32_limits_flags_test]")
 
 BACKEND_TEST_CASE ("Test allow_u32_limits_flags dynamic pass", "[allow_u32_limits_flags_test]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/6]

BACKEND_TEST_CASE ( "Test allow_u32_limits_flags default" ,
"" [allow_u32_limits_flags_test] )

Definition at line 67 of file allow_u32_limits_flags_tests.cpp.

67 {
69 CHECK_THROWS_AS(backend_t(mem_no_max_wasm, &wa), wasm_parse_exception);
70 CHECK_THROWS_AS(backend_t(mem_max_wasm, &wa), wasm_parse_exception);
71 CHECK_THROWS_AS(backend_t(table_no_max_wasm, &wa), wasm_parse_exception);
72 CHECK_THROWS_AS(backend_t(table_max_wasm, &wa), wasm_parse_exception);
73}
wasm_allocator wa
Definition main.cpp:10
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
Definition catch.hpp:203

◆ BACKEND_TEST_CASE() [2/6]

BACKEND_TEST_CASE ( "Test allow_u32_limits_flags dynamic fail" ,
"" [allow_u32_limits_flags_test] )

Definition at line 99 of file allow_u32_limits_flags_tests.cpp.

99 {
101 CHECK_THROWS_AS(backend_t(mem_max_wasm, nullptr, dynamic_options{false}), wasm_parse_exception);
102 CHECK_THROWS_AS(backend_t(mem_no_max_wasm, nullptr, dynamic_options{false}), wasm_parse_exception);
103 CHECK_THROWS_AS(backend_t(table_max_wasm, nullptr, dynamic_options{false}), wasm_parse_exception);
104 CHECK_THROWS_AS(backend_t(table_no_max_wasm, nullptr, dynamic_options{false}), wasm_parse_exception);
105}

◆ BACKEND_TEST_CASE() [3/6]

BACKEND_TEST_CASE ( "Test allow_u32_limits_flags dynamic pass" ,
"" [allow_u32_limits_flags_test] )

Definition at line 107 of file allow_u32_limits_flags_tests.cpp.

107 {
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});
113}

◆ BACKEND_TEST_CASE() [4/6]

BACKEND_TEST_CASE ( "Test allow_u32_limits_flags empty" ,
"" [allow_u32_limits_flags_test] )

Definition at line 75 of file allow_u32_limits_flags_tests.cpp.

75 {
77 CHECK_THROWS_AS(backend_t(mem_no_max_wasm, &wa), wasm_parse_exception);
78 CHECK_THROWS_AS(backend_t(mem_max_wasm, &wa), wasm_parse_exception);
79 CHECK_THROWS_AS(backend_t(table_no_max_wasm, &wa), wasm_parse_exception);
80 CHECK_THROWS_AS(backend_t(table_max_wasm, &wa), wasm_parse_exception);
81}

◆ BACKEND_TEST_CASE() [5/6]

BACKEND_TEST_CASE ( "Test allow_u32_limits_flags static fail" ,
"" [allow_u32_limits_flags_test] )

Definition at line 83 of file allow_u32_limits_flags_tests.cpp.

83 {
85 CHECK_THROWS_AS(backend_t(mem_no_max_wasm, &wa), wasm_parse_exception);
86 CHECK_THROWS_AS(backend_t(mem_max_wasm, &wa), wasm_parse_exception);
87 CHECK_THROWS_AS(backend_t(table_no_max_wasm, &wa), wasm_parse_exception);
88 CHECK_THROWS_AS(backend_t(table_max_wasm, &wa), wasm_parse_exception);
89}

◆ BACKEND_TEST_CASE() [6/6]

BACKEND_TEST_CASE ( "Test allow_u32_limits_flags static pass" ,
"" [allow_u32_limits_flags_test] )

Definition at line 91 of file allow_u32_limits_flags_tests.cpp.

91 {
93 backend_t backend_mem_no_max(mem_no_max_wasm, &wa);
94 backend_t backend_mem_max(mem_max_wasm, &wa);
95 backend_t backend_table_no_max(table_no_max_wasm, &wa);
96 backend_t backend_table_max(table_max_wasm, &wa);
97}

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.