1 use super::*; 2 use wasmtime::*; 3 4 #[test] engine_without_compiler_cannot_compile() -> Result<()>5fn engine_without_compiler_cannot_compile() -> Result<()> { 6 let mut config = Config::new(); 7 config.enable_compiler(false); 8 let engine = Engine::new(&config)?; 9 match Module::new(&engine, r#"(module (func (export "f") nop))"#) { 10 Ok(_) => panic!("should not compile without a compiler"), 11 Err(err) => err.assert_contains("Engine was not configured with a compiler"), 12 } 13 Ok(()) 14 } 15