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

Function tombstone_rows_roundtrip

nodedb-array/src/codec/tile_decode.rs:277–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275
276 #[test]
277 fn tombstone_rows_roundtrip() {
278 let s = schema();
279 let mut b = SparseTileBuilder::new(&s);
280 for i in 0..20 {
281 b.push_row(SparseRow {
282 coord: &[CoordValue::Int64(i)],
283 attrs: &[CellValue::Int64(i)],
284 surrogate: Surrogate::ZERO,
285 valid_from_ms: 0,
286 valid_until_ms: OPEN_UPPER,
287 kind: RowKind::Live,
288 })
289 .unwrap();
290 }
291 b.push_row(SparseRow {
292 coord: &[CoordValue::Int64(99)],
293 attrs: &[],
294 surrogate: Surrogate::ZERO,
295 valid_from_ms: 0,
296 valid_until_ms: OPEN_UPPER,
297 kind: RowKind::Tombstone,
298 })
299 .unwrap();
300 let tile = b.build();
301 let out = roundtrip(&tile);
302 assert_eq!(out.row_kinds, tile.row_kinds);
303 }
304
305 #[test]
306 fn invalid_version_returns_error() {

Callers

nothing calls this directly

Calls 4

push_rowMethod · 0.80
schemaFunction · 0.70
roundtripFunction · 0.70
buildMethod · 0.45

Tested by

no test coverage detected