()
| 1236 | |
| 1237 | #[tokio::test] |
| 1238 | async fn test_scope_get_pos_expression_arg() { |
| 1239 | let positions: Rc<RefCell<Vec<LineCol>>> = Rc::default(); |
| 1240 | let cmd = PosCapture::new(1, positions.clone()); |
| 1241 | let mut upcalls_by_name: HashMap<SymbolKey, Rc<dyn Callable>> = HashMap::new(); |
| 1242 | upcalls_by_name.insert(SymbolKey::from("POS_CAPTURE"), cmd); |
| 1243 | |
| 1244 | let compiler = Compiler::new(&upcalls_by_name, &[]).unwrap(); |
| 1245 | let image = compiler.compile(&mut b"POS_CAPTURE 1 + 2".as_slice()).unwrap(); |
| 1246 | let mut vm = Vm::new(upcalls_by_name); |
| 1247 | run_to_end(&mut vm, &image).await; |
| 1248 | |
| 1249 | let pos = positions.borrow(); |
| 1250 | assert_eq!(&[LineCol { line: 1, col: 13 }], pos.as_slice()); |
| 1251 | } |
| 1252 | |
| 1253 | #[tokio::test] |
| 1254 | async fn test_get_program_scalar() { |
nothing calls this directly
no test coverage detected