diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 2 | ||||
| -rw-r--r-- | src/vm.rs | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -41,7 +41,7 @@ mod tests { #[macro_export] macro_rules! assert_errs { ($result:expr, [ $( $kind:pat ),* ]) => { - println!("{} => {:?}", stringify!($result), $result); + eprintln!("{} => {:?}", stringify!($result), $result); assert!(matches!( $result.unwrap_err().as_slice(), &[$($crate::error::Error { @@ -527,6 +527,8 @@ impl VM { fn check_op(&mut self, op: Op) -> Result<(), Error> { match op { + Op::Unreachable => {} + Op::Jmp(_line) => {} Op::Return => { @@ -679,7 +681,7 @@ mod tests { test_string!(wrong_params, " f : fn -> int = fn a: int -> int {}", - [ErrorKind::TypeError(_, _)]); + [ErrorKind::TypeError(_, _), ErrorKind::TypeError(_, _)]); test_string!(wrong_ret, " f : fn -> int = fn {}", |
