()
| 1431 | let orig = PrimAddrs::new_orig(); |
| 1432 | let canon = PrimAddrs::new(); |
| 1433 | assert_eq!(p.nat.addr.hex(), orig.nat.hex()); |
| 1434 | // And the canonical addr is different from the LEON one — confirming |
| 1435 | // the two tables aren't accidentally aliased. |
| 1436 | assert_ne!(orig.nat.hex(), canon.nat.hex()); |
| 1437 | } |
| 1438 | |
| 1439 | #[test] |
| 1440 | fn primitives_from_env_orig_empty_fallback_name_is_synthetic() { |
| 1441 | // Check that the synthetic fallback name has the `@<8hex>` shape for |
| 1442 | // an address that doesn't exist in the env. Uses Meta mode so the |
| 1443 | // name metadata is observable. |
| 1444 | let env = KEnv::<crate::mode::Meta>::new(); |
| 1445 | let p = Primitives::from_env_orig(&env); |
| 1446 | // Name of `p.nat` should be `@<first 8 hex of nat_orig addr>`. |
| 1447 | let orig = PrimAddrs::new_orig(); |
| 1448 | let expected = format!("@{}", &orig.nat.hex()[..8]); |
| 1449 | let got_name = p.nat.name.clone(); |
nothing calls this directly
no test coverage detected