MCPcopy Create free account
hub / github.com/aleph-zero-foundation/AlephBFT / decoding_bool_node_map_works

Function decoding_bool_node_map_works

crypto/src/node.rs:361–366  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

359
360 #[test]
361 fn decoding_bool_node_map_works() {
362 let bool_node_map = NodeSubset([true, false, true, true, true].iter().cloned().collect());
363 let encoded: Vec<_> = bool_node_map.encode();
364 let decoded = NodeSubset::decode(&mut encoded.as_slice()).expect("decode should work");
365 assert_eq!(decoded, bool_node_map);
366 }
367
368 #[test]
369 fn test_bool_node_map_has_efficient_encoding() {

Callers

nothing calls this directly

Calls 2

NodeSubsetClass · 0.85
iterMethod · 0.45

Tested by

no test coverage detected