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

Function test_open_full

atomic-core/src/change/format_v3/reader/tests.rs:201–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199
200#[test]
201fn test_open_full() {
202 let (buf, _hash) = write_full_change();
203 let mut cursor = Cursor::new(&buf);
204
205 let reader = ChangeReader::open(&mut cursor).unwrap();
206
207 assert_eq!(reader.file_header().hash_table_entries, 2);
208 assert_eq!(reader.hash_table().len(), 2);
209 // HEADER + DEPS + PROV + 2 GRAPH + 2 SEMANTIC + 3 CONTENT + UNHASHED = 11
210 assert_eq!(reader.remaining_sections(), 11);
211}
212
213#[test]
214fn test_open_invalid_magic() {

Callers

nothing calls this directly

Calls 2

write_full_changeFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected