()
| 690 | |
| 691 | #[test] |
| 692 | fn test_local_put_global_through_local() -> Result<()> { |
| 693 | let upcalls = HashMap::default(); |
| 694 | let mut global = GlobalSymtable::new(upcalls); |
| 695 | let mut local = global.enter_scope(); |
| 696 | |
| 697 | let reg = |
| 698 | local.put_global(SymbolKey::from("g"), SymbolPrototype::Scalar(ExprType::Integer))?; |
| 699 | assert_eq!(Register::global(0).unwrap(), reg); |
| 700 | |
| 701 | // Should be visible from the local scope via fallthrough. |
| 702 | let (reg, proto) = local.get_local_or_global(&VarRef::new("g", None))?; |
| 703 | assert_eq!(Register::global(0).unwrap(), reg); |
| 704 | assert_eq!(SymbolPrototype::Scalar(ExprType::Integer), proto); |
| 705 | |
| 706 | Ok(()) |
| 707 | } |
| 708 | |
| 709 | #[test] |
| 710 | fn test_fixup_local_type() -> Result<()> { |
nothing calls this directly
no test coverage detected