()
| 609 | |
| 610 | #[test] |
| 611 | fn test_branch_content_eq() { |
| 612 | let mut branch1 = make_branch(); |
| 613 | let mut branch2 = Branch::new( |
| 614 | BranchId::new(NodeId::new(2), 0), |
| 615 | TrunkId::new(NodeId::new(1), 0), |
| 616 | ); |
| 617 | |
| 618 | // Same default hash |
| 619 | assert!(branch1.content_eq(&branch2)); |
| 620 | |
| 621 | // Different hash |
| 622 | branch1.set_line_hash(111); |
| 623 | branch2.set_line_hash(222); |
| 624 | assert!(!branch1.content_eq(&branch2)); |
| 625 | |
| 626 | // Same hash again |
| 627 | branch2.set_line_hash(111); |
| 628 | assert!(branch1.content_eq(&branch2)); |
| 629 | } |
| 630 | |
| 631 | #[test] |
| 632 | fn test_branch_display() { |
nothing calls this directly
no test coverage detected