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

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Test max_br_table_elements default", "[max_br_table_elements_test]")
 
 BACKEND_TEST_CASE ("Test max_br_table_elements unlimited", "[max_br_table_elements_test]")
 
 BACKEND_TEST_CASE ("Test max_br_table_elements static fail", "[max_br_table_elements_test]")
 
 BACKEND_TEST_CASE ("Test max_br_table_elements static pass", "[max_br_table_elements_test]")
 
 BACKEND_TEST_CASE ("Test max_br_table_elements dynamic fail", "[max_br_table_elements_test]")
 
 BACKEND_TEST_CASE ("Test max_br_table_elements dynamic pass", "[max_br_table_elements_test]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/6]

BACKEND_TEST_CASE ( "Test max_br_table_elements default" ,
"" [max_br_table_elements_test] )

Definition at line 36 of file max_br_table_elements_tests.cpp.

36 {
38 backend_t backend(two_elements_wasm, &wa);
39}
wasm_allocator wa
Definition main.cpp:10

◆ BACKEND_TEST_CASE() [2/6]

BACKEND_TEST_CASE ( "Test max_br_table_elements dynamic fail" ,
"" [max_br_table_elements_test] )

Definition at line 56 of file max_br_table_elements_tests.cpp.

56 {
58 CHECK_THROWS_AS(backend_t(two_elements_wasm, nullptr, dynamic_options{1}), wasm_parse_exception);
59}
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
Definition catch.hpp:203

◆ BACKEND_TEST_CASE() [3/6]

BACKEND_TEST_CASE ( "Test max_br_table_elements dynamic pass" ,
"" [max_br_table_elements_test] )

Definition at line 61 of file max_br_table_elements_tests.cpp.

61 {
63 backend_t backend(two_elements_wasm, nullptr, dynamic_options{2});
64}

◆ BACKEND_TEST_CASE() [4/6]

BACKEND_TEST_CASE ( "Test max_br_table_elements static fail" ,
"" [max_br_table_elements_test] )

Definition at line 46 of file max_br_table_elements_tests.cpp.

46 {
48 CHECK_THROWS_AS(backend_t(two_elements_wasm, &wa), wasm_parse_exception);
49}

◆ BACKEND_TEST_CASE() [5/6]

BACKEND_TEST_CASE ( "Test max_br_table_elements static pass" ,
"" [max_br_table_elements_test] )

Definition at line 51 of file max_br_table_elements_tests.cpp.

51 {
53 backend_t backend(two_elements_wasm, &wa);
54}

◆ BACKEND_TEST_CASE() [6/6]

BACKEND_TEST_CASE ( "Test max_br_table_elements unlimited" ,
"" [max_br_table_elements_test] )

Definition at line 41 of file max_br_table_elements_tests.cpp.

41 {
43 backend_t backend(two_elements_wasm, &wa);
44}

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.