()
| 538 | |
| 539 | #[test] |
| 540 | fn test_hash_in_hashset() { |
| 541 | use std::collections::HashSet; |
| 542 | |
| 543 | let mut set = HashSet::new(); |
| 544 | set.insert(Line::new(b"hello\n")); |
| 545 | set.insert(Line::new(b"world\n")); |
| 546 | |
| 547 | assert!(set.contains(&Line::new(b"hello\n"))); |
| 548 | assert!(set.contains(&Line::new(b"world\n"))); |
| 549 | assert!(!set.contains(&Line::new(b"foo\n"))); |
| 550 | } |
| 551 | |
| 552 | #[test] |
| 553 | fn test_last_line_tracking() { |