()
| 666 | |
| 667 | #[test] |
| 668 | fn test_local_falls_through_to_global() -> Result<()> { |
| 669 | let upcalls = HashMap::default(); |
| 670 | let mut global = GlobalSymtable::new(upcalls); |
| 671 | global.put_global(SymbolKey::from("g"), SymbolPrototype::Scalar(ExprType::Integer))?; |
| 672 | |
| 673 | let local = global.enter_scope(); |
| 674 | let (reg, proto) = local.get_local_or_global(&VarRef::new("g", None))?; |
| 675 | assert_eq!(Register::global(0).unwrap(), reg); |
| 676 | assert_eq!(SymbolPrototype::Scalar(ExprType::Integer), proto); |
| 677 | |
| 678 | Ok(()) |
| 679 | } |
| 680 | |
| 681 | #[test] |
| 682 | fn test_local_get_undefined() { |
nothing calls this directly
no test coverage detected