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

Function test_leaf_new

atomic-core/src/crdt/leaf.rs:520–528  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

518
519 #[test]
520 fn test_leaf_new() {
521 let leaf = make_leaf();
522 assert_eq!(leaf.id(), LeafId::new(NodeId::new(1), 0));
523 assert_eq!(leaf.branch(), BranchId::new(NodeId::new(1), 0));
524 assert_eq!(leaf.kind(), TokenKind::Word);
525 assert_eq!(leaf.content_range(), 0..5);
526 assert_eq!(leaf.content_len(), 5);
527 assert!(leaf.state().is_alive());
528 }
529
530 #[test]
531 fn test_leaf_is_empty() {

Callers

nothing calls this directly

Calls 1

make_leafFunction · 0.85

Tested by

no test coverage detected