Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
e_function_tests.cpp
Go to the documentation of this file.
1// Generated by spec_test_generator. DO NOT MODIFY THIS FILE.
2
3#include <algorithm>
4#include <vector>
5#include <iostream>
6#include <iterator>
7#include <cmath>
8#include <cstdlib>
9#include <catch2/catch.hpp>
10#include <utils.hpp>
11#include <wasm_config.hpp>
12#include <sysio/vm/backend.hpp>
13
14using namespace sysio;
15using namespace sysio::vm;
16extern wasm_allocator wa;
17
18BACKEND_TEST_CASE( "Testing wasm <e_function_0_wasm>", "[e_function_0_wasm_tests]" ) {
20 auto code = read_wasm( std::string(wasm_directory) + "e_function.0.wasm");
21 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
22}
23
24BACKEND_TEST_CASE( "Testing wasm <e_function_1_wasm>", "[e_function_1_wasm_tests]" ) {
26 auto code = read_wasm( std::string(wasm_directory) + "e_function.1.wasm");
27 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
28}
29
30BACKEND_TEST_CASE( "Testing wasm <e_function_2_wasm>", "[e_function_2_wasm_tests]" ) {
32 auto code = read_wasm( std::string(wasm_directory) + "e_function.2.wasm");
33 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
34}
35
wasm_allocator wa
Definition main.cpp:10
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
Definition catch.hpp:203
std::vector< uint8_t > read_wasm(const std::string &fname)
Definition utils.hpp:30
#define BACKEND_TEST_CASE(name, tags)
Definition utils.hpp:59