1#include <sysio/vm/backend.hpp>
21std::vector<uint8_t> nested_4_wasm = {
22 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60,
23 0x00, 0x00, 0x03, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x16, 0x02, 0x02, 0x00,
24 0x0b, 0x11, 0x00, 0x41, 0x00, 0x04, 0x40, 0x05, 0x41, 0x00, 0x1a, 0x0b,
25 0x02, 0x40, 0x02, 0x40, 0x0b, 0x0b, 0x0b
36std::vector<uint8_t> nested_4_wasm_2 = {
37 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60,
38 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0x0a, 0x16, 0x01, 0x14, 0x00, 0x41,
39 0x00, 0x04, 0x40, 0x05, 0x41, 0x00, 0x1a, 0x0b, 0x02, 0x40, 0x02, 0x40,
40 0x02, 0x40, 0x0b, 0x0b, 0x0b, 0x0b
43struct empty_options {};
44struct static_options_3 {
45 static constexpr std::uint32_t sysio_max_nested_structures = 3;
47struct static_options_4 {
48 static constexpr std::uint32_t sysio_max_nested_structures = 4;
50struct dynamic_options {
51 std::uint32_t sysio_max_nested_structures;
56BACKEND_TEST_CASE(
"Test sysio_max_nested_structures default",
"[sysio_max_nested_structures_test]") {
62BACKEND_TEST_CASE(
"Test sysio_max_nested_structures unlimited",
"[sysio_max_nested_structures_test]") {
68BACKEND_TEST_CASE(
"Test sysio_max_nested_structures static fail",
"[sysio_max_nested_structures_test]") {
74BACKEND_TEST_CASE(
"Test sysio_max_nested_structures static pass",
"[sysio_max_nested_structures_test]") {
80BACKEND_TEST_CASE(
"Test sysio_max_nested_structures dynamic fail",
"[sysio_max_nested_structures_test]") {
86BACKEND_TEST_CASE(
"Test sysio_max_nested_structures dynamic pass",
"[sysio_max_nested_structures_test]") {
89 backend_t backend2(nested_4_wasm_2,
nullptr, dynamic_options{4});
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
#define BACKEND_TEST_CASE(name, tags)