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

Function test_get_trunk_by_inode

atomic-core/src/crdt/apply/traits.rs:727–736  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

725
726 #[test]
727 fn test_get_trunk_by_inode() {
728 let mut txn = MockCrdtTxn::new();
729 let id = TrunkId::new(NodeId::new(1), 0);
730 let inode = Inode::new(42);
731 let trunk = Trunk::new(id, inode, "test.rs".to_string(), None);
732
733 txn.put_trunk(&trunk).unwrap();
734 let found = txn.get_trunk_by_inode(inode).unwrap();
735 assert_eq!(found, Some(id));
736 }
737
738 #[test]
739 fn test_update_trunk_path() {

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
put_trunkMethod · 0.45
get_trunk_by_inodeMethod · 0.45

Tested by

no test coverage detected