()
| 769 | |
| 770 | #[test] |
| 771 | fn test_list_branches() { |
| 772 | let mut txn = MockCrdtTxn::new(); |
| 773 | let trunk_id = TrunkId::new(NodeId::new(1), 0); |
| 774 | |
| 775 | let b1 = BranchId::new(NodeId::new(1), 0); |
| 776 | let b2 = BranchId::new(NodeId::new(1), 1); |
| 777 | |
| 778 | txn.put_branch(&Branch::new(b1, trunk_id), None).unwrap(); |
| 779 | txn.put_branch(&Branch::new(b2, trunk_id), Some(b1)) |
| 780 | .unwrap(); |
| 781 | |
| 782 | let branches = txn.list_branches(trunk_id).unwrap(); |
| 783 | assert_eq!(branches.len(), 2); |
| 784 | } |
| 785 | |
| 786 | #[test] |
| 787 | fn test_count_branches() { |
nothing calls this directly
no test coverage detected