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

Function test_pristine_file_state_clone

atomic-core/src/record/context.rs:1272–1287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1270
1271 #[test]
1272 fn test_pristine_file_state_clone() {
1273 let state = PristineFileState::new(
1274 Inode::new(42),
1275 Position::new(NodeId::new(5), ChangePosition::new(100)),
1276 "path/to/file.rs",
1277 )
1278 .with_size(2048)
1279 .as_directory();
1280
1281 let cloned = state.clone();
1282
1283 assert_eq!(cloned.inode, state.inode);
1284 assert_eq!(cloned.path, state.path);
1285 assert_eq!(cloned.size, state.size);
1286 assert_eq!(cloned.is_directory, state.is_directory);
1287 }
1288
1289 #[test]
1290 fn test_pristine_file_state_debug() {

Callers

nothing calls this directly

Calls 3

as_directoryMethod · 0.45
with_sizeMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected