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

Function test_inode_update_serialization

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

Source from the content-addressed store, hash-verified

751
752 #[test]
753 fn test_inode_update_serialization() {
754 let update = InodeUpdate::add(ChangePosition::new(100), Inode::new(42));
755 let json = serde_json::to_string(&update).unwrap();
756 let deserialized: InodeUpdate = serde_json::from_str(&json).unwrap();
757 assert_eq!(update, deserialized);
758
759 let update = InodeUpdate::deleted(Inode::new(42));
760 let json = serde_json::to_string(&update).unwrap();
761 let deserialized: InodeUpdate = serde_json::from_str(&json).unwrap();
762 assert_eq!(update, deserialized);
763 }
764
765 #[test]
766 fn test_inode_update_debug() {

Callers

nothing calls this directly

Calls 2

deletedFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected