()
| 833 | |
| 834 | #[test] |
| 835 | fn test_temp_scope_first() -> Result<()> { |
| 836 | let upcalls = HashMap::default(); |
| 837 | let mut global = GlobalSymtable::new(upcalls); |
| 838 | let mut local = global.enter_scope(); |
| 839 | local.put_local(SymbolKey::from("a"), SymbolPrototype::Scalar(ExprType::Integer))?; |
| 840 | local.put_local(SymbolKey::from("b"), SymbolPrototype::Scalar(ExprType::Integer))?; |
| 841 | { |
| 842 | let temp = local.frozen(); |
| 843 | let mut scope = temp.temp_scope(); |
| 844 | assert_eq!(Register::local(2).unwrap(), scope.first()?); |
| 845 | } |
| 846 | Ok(()) |
| 847 | } |
| 848 | |
| 849 | #[test] |
| 850 | fn test_temp_scope_first_no_locals() -> Result<()> { |
nothing calls this directly
no test coverage detected