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

Function sentinel_only_tile_uses_raw

nodedb-array/src/codec/tile_encode.rs:213–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211
212 #[test]
213 fn sentinel_only_tile_uses_raw() {
214 let s = schema();
215 let mut b = SparseTileBuilder::new(&s);
216 for i in 0..20 {
217 b.push_row(SparseRow {
218 coord: &[CoordValue::Int64(i), CoordValue::Int64(i)],
219 attrs: &[],
220 surrogate: Surrogate::ZERO,
221 valid_from_ms: 0,
222 valid_until_ms: OPEN_UPPER,
223 kind: RowKind::Tombstone,
224 })
225 .unwrap();
226 }
227 let tile = b.build();
228 let mut buf = Vec::new();
229 encode_sparse_tile(&tile, &mut buf).unwrap();
230 assert_eq!(buf[0], CodecTag::Raw.as_byte());
231 }
232
233 #[test]
234 fn version_byte_is_one() {

Callers

nothing calls this directly

Calls 4

encode_sparse_tileFunction · 0.85
push_rowMethod · 0.80
schemaFunction · 0.70
buildMethod · 0.45

Tested by

no test coverage detected