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

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Test max_mutable_global_bytes default", "[max_mutable_global_bytes_test]")
 
 BACKEND_TEST_CASE ("Test max_mutable_global_bytes static", "[max_mutable_global_bytes_test]")
 
 BACKEND_TEST_CASE ("Test max_mutable_global_bytes unlimited", "[max_mutable_global_bytes_test]")
 
 BACKEND_TEST_CASE ("Test max_mutable_global_bytes dynamic", "[max_mutable_global_bytes_test]")
 
 BACKEND_TEST_CASE ("Test max_mutable_global_bytes small", "[max_mutable_global_bytes_test]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/5]

BACKEND_TEST_CASE ( "Test max_mutable_global_bytes default" ,
"" [max_mutable_global_bytes_test] )

Definition at line 590 of file max_mutable_globals_tests.cpp.

590 {
592 backend_t backend1024(_1024_bytes_mixed_wasm, &wa);
593 backend_t backend1028(_1028_bytes_mixed_wasm, &wa);
594}
wasm_allocator wa
Definition main.cpp:10

◆ BACKEND_TEST_CASE() [2/5]

BACKEND_TEST_CASE ( "Test max_mutable_global_bytes dynamic" ,
"" [max_mutable_global_bytes_test] )

Definition at line 608 of file max_mutable_globals_tests.cpp.

608 {
610 backend_t backend1024(_1024_bytes_mixed_wasm, nullptr, dynamic_options{1024});
611 CHECK_THROWS_AS(backend_t(_1028_bytes_mixed_wasm, nullptr, dynamic_options{1024}), wasm_parse_exception);
612 backend_t backend1028(_1028_bytes_mixed_wasm, nullptr, dynamic_options{1028});
613}
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
Definition catch.hpp:203

◆ BACKEND_TEST_CASE() [3/5]

BACKEND_TEST_CASE ( "Test max_mutable_global_bytes small" ,
"" [max_mutable_global_bytes_test] )

Definition at line 615 of file max_mutable_globals_tests.cpp.

615 {
617 CHECK_THROWS_AS(backend_t(_1024_bytes_mixed_wasm, &wa), wasm_parse_exception);
618 CHECK_THROWS_AS(backend_t(_1028_bytes_mixed_wasm, &wa), wasm_parse_exception);
619}

◆ BACKEND_TEST_CASE() [4/5]

BACKEND_TEST_CASE ( "Test max_mutable_global_bytes static" ,
"" [max_mutable_global_bytes_test] )

Definition at line 596 of file max_mutable_globals_tests.cpp.

596 {
598 backend_t backend(_1024_bytes_mixed_wasm, &wa);
599 CHECK_THROWS_AS(backend_t(_1028_bytes_mixed_wasm, &wa), wasm_parse_exception);
600}

◆ BACKEND_TEST_CASE() [5/5]

BACKEND_TEST_CASE ( "Test max_mutable_global_bytes unlimited" ,
"" [max_mutable_global_bytes_test] )

Definition at line 602 of file max_mutable_globals_tests.cpp.

602 {
604 backend_t backend1024(_1024_bytes_mixed_wasm, &wa);
605 backend_t backend1028(_1028_bytes_mixed_wasm, &wa);
606}

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.