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:1268–1283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1266
1267 #[test]
1268 fn test_pristine_file_state_clone() {
1269 let state = PristineFileState::new(
1270 Inode::new(42),
1271 Position::new(NodeId::new(5), ChangePosition::new(100)),
1272 "path/to/file.rs",
1273 )
1274 .with_size(2048)
1275 .as_directory();
1276
1277 let cloned = state.clone();
1278
1279 assert_eq!(cloned.inode, state.inode);
1280 assert_eq!(cloned.path, state.path);
1281 assert_eq!(cloned.size, state.size);
1282 assert_eq!(cloned.is_directory, state.is_directory);
1283 }
1284
1285 #[test]
1286 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