MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_hash_in_hashset

Function test_hash_in_hashset

atomic-core/src/diff/line.rs:540–550  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected