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

Function multiple_strings_roundtrip

nodedb-codec/src/fsst.rs:389–404  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

387
388 #[test]
389 fn multiple_strings_roundtrip() {
390 let strings: Vec<&[u8]> = vec![
391 b"us-east-1",
392 b"us-east-2",
393 b"us-west-1",
394 b"eu-west-1",
395 b"us-east-1",
396 b"us-east-1",
397 ];
398 let encoded = encode(&strings);
399 let decoded = decode(&encoded).unwrap();
400 assert_eq!(decoded.len(), strings.len());
401 for (a, b) in strings.iter().zip(decoded.iter()) {
402 assert_eq!(*a, b.as_slice());
403 }
404 }
405
406 #[test]
407 fn repetitive_log_lines() {

Callers

nothing calls this directly

Calls 3

encodeFunction · 0.70
decodeFunction · 0.70
iterMethod · 0.45

Tested by

no test coverage detected