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

Function test_recorded_into_parts

atomic-core/src/record/builder.rs:931–943  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

929
930 #[test]
931 fn test_recorded_into_parts() {
932 let mut builder = RecordBuilder::new();
933 builder.append_contents(b"content");
934 builder.add_hunk(create_test_file_add_hunk());
935 builder.add_inode_update(0, InodeUpdate::add(ChangePosition::new(0), Inode::new(1)));
936
937 let recorded = builder.finish();
938 let (actions, contents, updatables) = recorded.into_parts();
939
940 assert_eq!(actions.len(), 1);
941 assert_eq!(contents, b"content");
942 assert_eq!(updatables.len(), 1);
943 }
944
945 #[test]
946 fn test_recorded_actions() {

Callers

nothing calls this directly

Calls 6

add_inode_updateMethod · 0.80
append_contentsMethod · 0.45
add_hunkMethod · 0.45
finishMethod · 0.45
into_partsMethod · 0.45

Tested by

no test coverage detected