()
| 1252 | |
| 1253 | #[tokio::test] |
| 1254 | async fn test_get_program_scalar() { |
| 1255 | let compiler = Compiler::new(&HashMap::default(), &[]).unwrap(); |
| 1256 | let image = compiler.compile(&mut b"x = 123".as_slice()).unwrap(); |
| 1257 | let mut vm = Vm::new(HashMap::default()); |
| 1258 | run_to_end(&mut vm, &image).await; |
| 1259 | |
| 1260 | assert_eq!( |
| 1261 | Some(ConstantDatum::Integer(123)), |
| 1262 | vm.get_program(&image, &SymbolKey::from("x")).unwrap() |
| 1263 | ); |
| 1264 | assert_eq!(None, vm.get_program(&image, &SymbolKey::from("missing")).unwrap()); |
| 1265 | } |
| 1266 | |
| 1267 | #[tokio::test] |
| 1268 | async fn test_get_program_array() { |
nothing calls this directly
no test coverage detected