()
| 872 | |
| 873 | #[tokio::test] |
| 874 | async fn test_exec_end_code_explicit() { |
| 875 | let mut vm = Vm::new(HashMap::default()); |
| 876 | let compiler = Compiler::new(&HashMap::default(), &[]).unwrap(); |
| 877 | let image = compiler.compile(&mut b"END 3".as_slice()).unwrap(); |
| 878 | match vm.exec(&image) { |
| 879 | StopReason::End(code) if code.to_i32() == 3 => (), |
| 880 | _ => panic!("Unexpected stop reason"), |
| 881 | } |
| 882 | } |
| 883 | |
| 884 | #[tokio::test] |
| 885 | async fn test_exec_end_can_resume_after_append() { |