()
| 609 | |
| 610 | #[test] |
| 611 | fn test_chain_detects_cycle() { |
| 612 | // a → b → a is a corrupt parent chain, not an infinite loop. |
| 613 | let err = |
| 614 | build_view_chain("a", parents(&[("a", Some("b")), ("b", Some("a"))])).unwrap_err(); |
| 615 | match err { |
| 616 | ChainError::Cycle { view } => assert_eq!(view, "a"), |
| 617 | other => panic!("Expected Cycle, got {:?}", other), |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | #[test] |
| 622 | fn test_chain_detects_self_cycle() { |
nothing calls this directly
no test coverage detected