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

Source from the content-addressed store, hash-verified

1251
1252 #[test]
1253 fn test_pristine_file_state_clone() {
1254 let state = PristineFileState::new(
1255 Inode::new(42),
1256 Position::new(NodeId::new(5), ChangePosition::new(100)),
1257 "path/to/file.rs",
1258 )
1259 .with_size(2048)
1260 .as_directory();
1261
1262 let cloned = state.clone();
1263
1264 assert_eq!(cloned.inode, state.inode);
1265 assert_eq!(cloned.path, state.path);
1266 assert_eq!(cloned.size, state.size);
1267 assert_eq!(cloned.is_directory, state.is_directory);
1268 }
1269
1270 #[test]
1271 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