()
| 715 | |
| 716 | #[test] |
| 717 | fn test_has_contents() { |
| 718 | let store = MemoryChangeStore::new(); |
| 719 | |
| 720 | // Change with content |
| 721 | let with_content = create_test_change("Has content", b"data"); |
| 722 | let hash1 = with_content.hash().unwrap(); |
| 723 | store.insert(hash1, with_content); |
| 724 | |
| 725 | // Change without content |
| 726 | let without_content = create_test_change("No content", b""); |
| 727 | let hash2 = without_content.hash().unwrap(); |
| 728 | store.insert(hash2, without_content); |
| 729 | |
| 730 | assert!(store.has_contents(&hash1)); |
| 731 | assert!(!store.has_contents(&hash2)); |
| 732 | assert!(!store.has_contents(&Hash::of(b"nonexistent"))); |
| 733 | } |
| 734 | |
| 735 | #[test] |
| 736 | fn test_get_header() { |
nothing calls this directly
no test coverage detected