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

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Test allow_zero_blocktype default", "[allow_zero_blocktype_test]")
 
 BACKEND_TEST_CASE ("Test allow_zero_blocktype empty", "[allow_zero_blocktype_test]")
 
 BACKEND_TEST_CASE ("Test allow_zero_blocktype static fail", "[allow_zero_blocktype_test]")
 
 BACKEND_TEST_CASE ("Test allow_zero_blocktype static pass", "[allow_zero_blocktype_test]")
 
 BACKEND_TEST_CASE ("Test allow_zero_blocktype dynamic fail", "[allow_zero_blocktype_test]")
 
 BACKEND_TEST_CASE ("Test allow_zero_blocktype dynamic pass", "[allow_zero_blocktype_test]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/6]

BACKEND_TEST_CASE ( "Test allow_zero_blocktype default" ,
"" [allow_zero_blocktype_test] )

Definition at line 58 of file allow_zero_blocktype_tests.cpp.

58 {
60 CHECK_THROWS_AS(backend_t(block_wasm, &wa), wasm_parse_exception);
61 CHECK_THROWS_AS(backend_t(loop_wasm, &wa), wasm_parse_exception);
62 CHECK_THROWS_AS(backend_t(if_wasm, &wa), wasm_parse_exception);
63}
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_zero_blocktype dynamic fail" ,
"" [allow_zero_blocktype_test] )

Definition at line 86 of file allow_zero_blocktype_tests.cpp.

86 {
88 CHECK_THROWS_AS(backend_t(block_wasm, nullptr, dynamic_options{false}), wasm_parse_exception);
89 CHECK_THROWS_AS(backend_t(loop_wasm, nullptr, dynamic_options{false}), wasm_parse_exception);
90 CHECK_THROWS_AS(backend_t(if_wasm, nullptr, dynamic_options{false}), wasm_parse_exception);
91}

◆ BACKEND_TEST_CASE() [3/6]

BACKEND_TEST_CASE ( "Test allow_zero_blocktype dynamic pass" ,
"" [allow_zero_blocktype_test] )

Definition at line 93 of file allow_zero_blocktype_tests.cpp.

93 {
95 backend_t backend_block(block_wasm, nullptr, dynamic_options{true});
96 backend_t backend_loop(loop_wasm, nullptr, dynamic_options{true});
97 backend_t backend_if(if_wasm, nullptr, dynamic_options{true});
98}

◆ BACKEND_TEST_CASE() [4/6]

BACKEND_TEST_CASE ( "Test allow_zero_blocktype empty" ,
"" [allow_zero_blocktype_test] )

Definition at line 65 of file allow_zero_blocktype_tests.cpp.

65 {
67 CHECK_THROWS_AS(backend_t(block_wasm, &wa), wasm_parse_exception);
68 CHECK_THROWS_AS(backend_t(loop_wasm, &wa), wasm_parse_exception);
69 CHECK_THROWS_AS(backend_t(if_wasm, &wa), wasm_parse_exception);
70}

◆ BACKEND_TEST_CASE() [5/6]

BACKEND_TEST_CASE ( "Test allow_zero_blocktype static fail" ,
"" [allow_zero_blocktype_test] )

Definition at line 72 of file allow_zero_blocktype_tests.cpp.

72 {
74 CHECK_THROWS_AS(backend_t(block_wasm, &wa), wasm_parse_exception);
75 CHECK_THROWS_AS(backend_t(loop_wasm, &wa), wasm_parse_exception);
76 CHECK_THROWS_AS(backend_t(if_wasm, &wa), wasm_parse_exception);
77}

◆ BACKEND_TEST_CASE() [6/6]

BACKEND_TEST_CASE ( "Test allow_zero_blocktype static pass" ,
"" [allow_zero_blocktype_test] )

Definition at line 79 of file allow_zero_blocktype_tests.cpp.

79 {
81 backend_t backend_block(block_wasm, &wa);
82 backend_t backend_loop(loop_wasm, &wa);
83 backend_t backend_if(if_wasm, &wa);
84}

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.