diff --git a/arbitrator/jit/src/test.rs b/arbitrator/jit/src/test.rs index 1e2940718..517c8596c 100644 --- a/arbitrator/jit/src/test.rs +++ b/arbitrator/jit/src/test.rs @@ -3,21 +3,21 @@ #![cfg(test)] -// use wasmer::{imports, Instance, Module, Store, Value}; +use wasmer::{imports, Instance, Module, Store, Value}; -// #[test] -// fn test_crate() -> eyre::Result<()> { -// // Adapted from https://docs.rs/wasmer/3.1.0/wasmer/index.html +#[test] +fn test_crate() -> eyre::Result<()> { + // Adapted from https://docs.rs/wasmer/3.1.0/wasmer/index.html -// let source = std::fs::read("programs/pure/main.wat")?; + let source = std::fs::read("programs/pure/main.wat")?; -// let mut store = Store::default(); -// let module = Module::new(&store, source)?; -// let imports = imports! {}; -// let instance = Instance::new(&mut store, &module, &imports)?; + let mut store = Store::default(); + let module = Module::new(&store, source)?; + let imports = imports! {}; + let instance = Instance::new(&mut store, &module, &imports)?; -// let add_one = instance.exports.get_function("add_one")?; -// let result = add_one.call(&mut store, &[Value::I32(42)])?; -// assert_eq!(result[0], Value::I32(43)); -// Ok(()) -// } + let add_one = instance.exports.get_function("add_one")?; + let result = add_one.call(&mut store, &[Value::I32(42)])?; + assert_eq!(result[0], Value::I32(43)); + Ok(()) +} diff --git a/nitro-testnode b/nitro-testnode index 50c9658b0..dfa9c4ee1 160000 --- a/nitro-testnode +++ b/nitro-testnode @@ -1 +1 @@ -Subproject commit 50c9658b0b8a51d6efe6cae51015e5afe393e3cd +Subproject commit dfa9c4ee1312e4cfc15ec721fc7a35587384f7a6