MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / live_ceiling_at_cutoff

Function live_ceiling_at_cutoff

nodedb-array/src/query/ceiling.rs:116–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114
115 #[test]
116 fn live_ceiling_at_cutoff() {
117 // Three versions: v1@100, v2@200, v3@300.
118 // Query at system_as_of=250 → v2.
119 let v1 = payload(0, OPEN_UPPER, 1);
120 let v2 = payload(0, OPEN_UPPER, 2);
121 let v3 = payload(0, OPEN_UPPER, 3);
122
123 let versions = vec![
124 (TileId::new(1, 300), v3.as_slice()),
125 (TileId::new(1, 200), v2.as_slice()),
126 (TileId::new(1, 100), v1.as_slice()),
127 ];
128
129 let result = ceiling_resolve_cell(versions, &[], &live_params(250, None)).unwrap();
130 match result {
131 CeilingResult::Live(p) => assert_eq!(p.attrs[0], CellValue::Int64(2)),
132 other => panic!("expected Live(2), got {other:?}"),
133 }
134 }
135
136 #[test]
137 fn tombstone_shadows_earlier_versions() {

Callers

nothing calls this directly

Calls 3

ceiling_resolve_cellFunction · 0.85
live_paramsFunction · 0.85
payloadFunction · 0.70

Tested by

no test coverage detected