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

Function test_chunk_tiny_data

atomic-core/src/change/format_v3/chunking.rs:745–754  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

743
744 #[test]
745 fn test_chunk_tiny_data() {
746 let data = b"Hello";
747 let chunks = chunk_content(data, &ChunkingOptions::default());
748
749 assert_eq!(chunks.len(), 1);
750 assert_eq!(chunks[0].offset, 0);
751 assert_eq!(chunks[0].length, 5);
752 assert_eq!(chunks[0].index, 0);
753 assert_eq!(chunks[0].hash, *blake3::hash(data).as_bytes());
754 }
755
756 #[test]
757 fn test_chunk_exactly_min_size() {

Callers

nothing calls this directly

Calls 1

chunk_contentFunction · 0.85

Tested by

no test coverage detected