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

Function test_record_item_with_details

atomic-core/src/record/item.rs:955–971  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

953
954 #[test]
955 fn test_record_item_with_details() {
956 let path = PathBuf::from("docs/README.md");
957 let inode = Inode::new(10);
958 let parent_inode = Inode::new(5);
959 let parent_pos = Position::new(NodeId::new(1), ChangePosition::new(50));
960 let metadata = FileMetadata::executable();
961
962 let item =
963 RecordItem::with_details(path.clone(), inode, parent_inode, parent_pos, metadata);
964
965 assert_eq!(item.path(), path.as_path());
966 assert_eq!(item.basename(), "README.md");
967 assert_eq!(item.inode(), inode);
968 assert_eq!(item.parent_inode(), parent_inode);
969 assert_eq!(item.parent_position(), parent_pos);
970 assert_eq!(item.metadata(), metadata);
971 }
972
973 #[test]
974 fn test_record_item_path_string() {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected