Skip to content

Commit d1a6d0b

Browse files
committed
Handle incorrect error format
1 parent 8f919e1 commit d1a6d0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/tests/metta.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ fn run_metta_test(code: &[u8]) -> Result<(), String> {
8484
let err = atom_to_string(err);
8585
return Err(format!("{} returns error: {}", atom, err));
8686
},
87+
Ok([op, ..]) if *op == ERROR_SYMBOL => {
88+
return Err(format!("incorrect error format: {}", atom));
89+
},
8790
_ => {},
8891
}
8992
}

0 commit comments

Comments
 (0)