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

Function test_get_trunk_by_path

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

Source from the content-addressed store, hash-verified

714
715 #[test]
716 fn test_get_trunk_by_path() {
717 let mut txn = MockCrdtTxn::new();
718 let id = TrunkId::new(NodeId::new(1), 0);
719 let trunk = Trunk::new(id, Inode::new(1), "src/main.rs".to_string(), None);
720
721 txn.put_trunk(&trunk).unwrap();
722 let found = txn.get_trunk_by_path("src/main.rs").unwrap();
723 assert_eq!(found, Some(id));
724 }
725
726 #[test]
727 fn test_get_trunk_by_inode() {

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
put_trunkMethod · 0.45
get_trunk_by_pathMethod · 0.45

Tested by

no test coverage detected