()
| 700 | |
| 701 | #[test] |
| 702 | fn test_clone() { |
| 703 | let store = MemoryChangeStore::new(); |
| 704 | let change = create_test_change("Clone test", b"data"); |
| 705 | let hash = change.hash().unwrap(); |
| 706 | store.insert(hash, change); |
| 707 | |
| 708 | let cloned = store.clone(); |
| 709 | |
| 710 | assert!(cloned.has_change(&hash)); |
| 711 | assert_eq!(cloned.len(), 1); |
| 712 | |
| 713 | // Modifications to clone don't affect original |
| 714 | cloned.clear(); |
| 715 | assert!(store.has_change(&hash)); |
| 716 | } |
| 717 | |
| 718 | #[test] |
| 719 | fn test_debug() { |