()
| 91 | |
| 92 | #[test] |
| 93 | fn strings() -> Result<()> { |
| 94 | let engine = super::engine(); |
| 95 | let mut store = Store::new(&engine, ()); |
| 96 | |
| 97 | let component = Component::new(&engine, make_echo_component("string", 8))?; |
| 98 | let instance = Linker::new(&engine).instantiate(&mut store, &component)?; |
| 99 | let func = instance.get_func(&mut store, "echo").unwrap(); |
| 100 | let input = Val::String("hello, component!".into()); |
| 101 | let mut output = [Val::Bool(false)]; |
| 102 | func.call(&mut store, &[input.clone()], &mut output)?; |
| 103 | assert_eq!(input, output[0]); |
| 104 | |
| 105 | Ok(()) |
| 106 | } |
| 107 | |
| 108 | #[test] |
| 109 | fn lists() -> Result<()> { |
nothing calls this directly
no test coverage detected