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

Function empty_values

nodedb-codec/src/pipeline.rs:480–499  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

478
479 #[test]
480 fn empty_values() {
481 let empty_i64: Vec<i64> = vec![];
482 let empty_f64: Vec<f64> = vec![];
483
484 for codec in [
485 ColumnCodec::DeltaFastLanesLz4,
486 ColumnCodec::FastLanesLz4,
487 ColumnCodec::AlpFastLanesLz4,
488 ] {
489 if matches!(codec, ColumnCodec::AlpFastLanesLz4) {
490 let enc = encode_f64_pipeline(&empty_f64, codec).unwrap();
491 let dec = decode_f64_pipeline(&enc, codec).unwrap();
492 assert!(dec.is_empty());
493 } else {
494 let enc = encode_i64_pipeline(&empty_i64, codec).unwrap();
495 let dec = decode_i64_pipeline(&enc, codec).unwrap();
496 assert!(dec.is_empty());
497 }
498 }
499 }
500
501 #[test]
502 fn bytes_pipeline_roundtrip() {

Callers

nothing calls this directly

Calls 4

encode_f64_pipelineFunction · 0.85
decode_f64_pipelineFunction · 0.85
encode_i64_pipelineFunction · 0.85
decode_i64_pipelineFunction · 0.85

Tested by

no test coverage detected