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

Function test_stats_leaf_operations

atomic-core/src/crdt/apply/context.rs:824–840  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

822
823 #[test]
824 fn test_stats_leaf_operations() {
825 let mut stats = ApplyStats::new();
826
827 stats.add_leaf_inserted();
828 assert_eq!(stats.leaves_inserted(), 1);
829
830 stats.add_leaf_deleted();
831 assert_eq!(stats.leaves_deleted(), 1);
832
833 stats.add_leaf_replaced();
834 assert_eq!(stats.leaves_replaced(), 1);
835
836 stats.add_leaf_restored();
837 assert_eq!(stats.leaves_restored(), 1);
838
839 assert_eq!(stats.total_leaf_ops(), 4);
840 }
841
842 #[test]
843 fn test_stats_total_operations() {

Callers

nothing calls this directly

Calls 4

add_leaf_insertedMethod · 0.80
add_leaf_deletedMethod · 0.80
add_leaf_replacedMethod · 0.80
add_leaf_restoredMethod · 0.80

Tested by

no test coverage detected