()
| 739 | |
| 740 | #[test] |
| 741 | fn test_has_contents() { |
| 742 | let store = MemoryChangeStore::new(); |
| 743 | |
| 744 | // Change with content |
| 745 | let with_content = create_test_change("Has content", b"data"); |
| 746 | let hash1 = with_content.hash().unwrap(); |
| 747 | store.insert(hash1, with_content); |
| 748 | |
| 749 | // Change without content |
| 750 | let without_content = create_test_change("No content", b""); |
| 751 | let hash2 = without_content.hash().unwrap(); |
| 752 | store.insert(hash2, without_content); |
| 753 | |
| 754 | assert!(store.has_contents(&hash1)); |
| 755 | assert!(!store.has_contents(&hash2)); |
| 756 | assert!(!store.has_contents(&Hash::of(b"nonexistent"))); |
| 757 | } |
| 758 | |
| 759 | #[test] |
| 760 | fn test_get_header() { |
nothing calls this directly
no test coverage detected