Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
custom_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 <custom_0_wasm>", "[custom_0_wasm_tests]" ) {
20 auto code = read_wasm( std::string(wasm_directory) + "custom.0.wasm");
21 backend_t bkend( code, &wa );
22
23}
24
25BACKEND_TEST_CASE( "Testing wasm <custom_1_wasm>", "[custom_1_wasm_tests]" ) {
27 auto code = read_wasm( std::string(wasm_directory) + "custom.1.wasm");
28 backend_t bkend( code, &wa );
29
30}
31
32BACKEND_TEST_CASE( "Testing wasm <custom_2_wasm>", "[custom_2_wasm_tests]" ) {
34 auto code = read_wasm( std::string(wasm_directory) + "custom.2.wasm");
35 backend_t bkend( code, &wa );
36
37}
38
39BACKEND_TEST_CASE( "Testing wasm <custom_3_wasm>", "[custom_3_wasm_tests]" ) {
41 auto code = read_wasm( std::string(wasm_directory) + "custom.3.wasm");
42 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
43}
44
45BACKEND_TEST_CASE( "Testing wasm <custom_4_wasm>", "[custom_4_wasm_tests]" ) {
47 auto code = read_wasm( std::string(wasm_directory) + "custom.4.wasm");
48 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
49}
50
51BACKEND_TEST_CASE( "Testing wasm <custom_5_wasm>", "[custom_5_wasm_tests]" ) {
53 auto code = read_wasm( std::string(wasm_directory) + "custom.5.wasm");
54 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
55}
56
57BACKEND_TEST_CASE( "Testing wasm <custom_6_wasm>", "[custom_6_wasm_tests]" ) {
59 auto code = read_wasm( std::string(wasm_directory) + "custom.6.wasm");
60 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
61}
62
63BACKEND_TEST_CASE( "Testing wasm <custom_7_wasm>", "[custom_7_wasm_tests]" ) {
65 auto code = read_wasm( std::string(wasm_directory) + "custom.7.wasm");
66 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
67}
68
69BACKEND_TEST_CASE( "Testing wasm <custom_8_wasm>", "[custom_8_wasm_tests]" ) {
71 auto code = read_wasm( std::string(wasm_directory) + "custom.8.wasm");
72 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
73}
74
75BACKEND_TEST_CASE( "Testing wasm <custom_9_wasm>", "[custom_9_wasm_tests]" ) {
77 auto code = read_wasm( std::string(wasm_directory) + "custom.9.wasm");
78 CHECK_THROWS_AS(backend_t(code, nullptr), std::exception);
79}
80
wasm_allocator wa
Definition main.cpp:10
backend_t bkend(hello_wasm, ehm, &wa)
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