diff --git a/examples/wasm_modules/rust-wasm/fake.wasm b/examples/wasm_modules/rust-wasm/fake.wasm new file mode 100644 index 00000000..e69de29b diff --git a/wasm_runtime/src/module.rs b/wasm_runtime/src/module.rs index fa8a9834..bac0d1c6 100644 --- a/wasm_runtime/src/module.rs +++ b/wasm_runtime/src/module.rs @@ -109,7 +109,7 @@ mod tests { } #[test] - fn test_load_from_file_failure() { + fn test_load_from_file_failure_nonexistent() { // setup non-existent path const PATH: &str = "../attempt/to/load/me.wasm"; @@ -119,4 +119,16 @@ mod tests { // test assertion assert!(res.is_err()); } + + #[test] + fn test_load_from_file_failure_fakefile() { + // setup fake path + const PATH: &str = "../examples/wasm_modules/rust-wasm/fake.wasm"; + + // execute test of failed load + let res = WasmModule::load_from_file(PATH); + + // test assertion + assert!(res.is_err()); + } } \ No newline at end of file