1*1819edbaSAlex Crichton #include <wasmtime/module.hh> 2*1819edbaSAlex Crichton 3*1819edbaSAlex Crichton #include <gtest/gtest.h> 4*1819edbaSAlex Crichton 5*1819edbaSAlex Crichton using namespace wasmtime; 6*1819edbaSAlex Crichton TEST(Module,Simple)7*1819edbaSAlex CrichtonTEST(Module, Simple) { 8*1819edbaSAlex Crichton Engine engine; 9*1819edbaSAlex Crichton Module m = Module::compile(engine, "(module)").unwrap(); 10*1819edbaSAlex Crichton auto wasm = wat2wasm("(module)").unwrap(); 11*1819edbaSAlex Crichton Module::compile(engine, wasm).unwrap(); 12*1819edbaSAlex Crichton Module::validate(engine, wasm).unwrap(); 13*1819edbaSAlex Crichton 14*1819edbaSAlex Crichton auto serialized = m.serialize().unwrap(); 15*1819edbaSAlex Crichton Module::deserialize(engine, serialized).unwrap(); 16*1819edbaSAlex Crichton } 17