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

Function hostnames

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

Source from the content-addressed store, hash-verified

436
437 #[test]
438 fn hostnames() {
439 let hosts: Vec<&[u8]> = vec![
440 b"prod-web-01.us-east-1.example.com",
441 b"prod-web-02.us-east-1.example.com",
442 b"prod-web-03.us-east-1.example.com",
443 b"prod-api-01.us-west-2.example.com",
444 b"prod-api-02.us-west-2.example.com",
445 b"staging-web-01.eu-west-1.example.com",
446 ];
447 let encoded = encode(&hosts);
448 let decoded = decode(&encoded).unwrap();
449 for (a, b) in hosts.iter().zip(decoded.iter()) {
450 assert_eq!(*a, b.as_slice());
451 }
452 }
453
454 #[test]
455 fn binary_data() {

Callers

nothing calls this directly

Calls 3

encodeFunction · 0.70
decodeFunction · 0.70
iterMethod · 0.45

Tested by

no test coverage detected