MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_get_program_scalar

Function test_get_program_scalar

core/src/vm/mod.rs:1254–1265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

run_to_endFunction · 0.85
compileMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected