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

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Test forbid_export_mutable_globals default", "[forbid_export_mutable_globals_test]")
 
 BACKEND_TEST_CASE ("Test forbid_export_mutable_globals empty", "[forbid_export_mutable_globals_test]")
 
 BACKEND_TEST_CASE ("Test forbid_export_mutable_globals static pass", "[forbid_export_mutable_globals_test]")
 
 BACKEND_TEST_CASE ("Test forbid_export_mutable_globals static fail", "[forbid_export_mutable_globals_test]")
 
 BACKEND_TEST_CASE ("Test forbid_export_mutable_globals dynamic pass", "[forbid_export_mutable_globals_test]")
 
 BACKEND_TEST_CASE ("Test forbid_export_mutable_globals dynamic fail", "[forbid_export_mutable_globals_test]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/6]

BACKEND_TEST_CASE ( "Test forbid_export_mutable_globals default" ,
"" [forbid_export_mutable_globals_test] )

Definition at line 35 of file forbid_export_mutable_globals_tests.cpp.

35 {
37 backend_t backend(mut_global_wasm, &wa);
38}
wasm_allocator wa
Definition main.cpp:10

◆ BACKEND_TEST_CASE() [2/6]

BACKEND_TEST_CASE ( "Test forbid_export_mutable_globals dynamic fail" ,
"" [forbid_export_mutable_globals_test] )

Definition at line 60 of file forbid_export_mutable_globals_tests.cpp.

60 {
62 CHECK_THROWS_AS(backend_t(mut_global_wasm, nullptr, dynamic_options{true}), wasm_parse_exception);
63}
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 forbid_export_mutable_globals dynamic pass" ,
"" [forbid_export_mutable_globals_test] )

Definition at line 55 of file forbid_export_mutable_globals_tests.cpp.

55 {
57 backend_t backend(mut_global_wasm, nullptr, dynamic_options{false});
58}

◆ BACKEND_TEST_CASE() [4/6]

BACKEND_TEST_CASE ( "Test forbid_export_mutable_globals empty" ,
"" [forbid_export_mutable_globals_test] )

Definition at line 40 of file forbid_export_mutable_globals_tests.cpp.

40 {
42 backend_t backend(mut_global_wasm, &wa);
43}

◆ BACKEND_TEST_CASE() [5/6]

BACKEND_TEST_CASE ( "Test forbid_export_mutable_globals static fail" ,
"" [forbid_export_mutable_globals_test] )

Definition at line 50 of file forbid_export_mutable_globals_tests.cpp.

50 {
52 CHECK_THROWS_AS(backend_t(mut_global_wasm, &wa), wasm_parse_exception);
53}

◆ BACKEND_TEST_CASE() [6/6]

BACKEND_TEST_CASE ( "Test forbid_export_mutable_globals static pass" ,
"" [forbid_export_mutable_globals_test] )

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.