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

Function test_insert_position_to_index

atomic-core/src/crdt/apply/order.rs:468–473  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

466
467 #[test]
468 fn test_insert_position_to_index() {
469 assert_eq!(InsertPosition::Start.to_insert_index(5), 0);
470 assert_eq!(InsertPosition::After(0).to_insert_index(5), 1);
471 assert_eq!(InsertPosition::After(2).to_insert_index(5), 3);
472 assert_eq!(InsertPosition::End.to_insert_index(5), 5);
473 }
474
475 #[test]
476 fn test_insert_position_is_start() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected