()
| 555 | |
| 556 | #[test] |
| 557 | fn test_chain_detects_cycle() { |
| 558 | // a → b → a is a corrupt parent chain, not an infinite loop. |
| 559 | let err = |
| 560 | build_view_chain("a", parents(&[("a", Some("b")), ("b", Some("a"))])).unwrap_err(); |
| 561 | match err { |
| 562 | ChainError::Cycle { view } => assert_eq!(view, "a"), |
| 563 | other => panic!("Expected Cycle, got {:?}", other), |
| 564 | } |
| 565 | } |
| 566 | |
| 567 | #[test] |
| 568 | fn test_chain_detects_self_cycle() { |
nothing calls this directly
no test coverage detected