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

Function decoding_node_index_works

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

Source from the content-addressed store, hash-verified

309 use codec::{Decode, Encode};
310 #[test]
311 fn decoding_node_index_works() {
312 for i in 0..1000 {
313 let node_index = NodeIndex(i);
314 let mut encoded: &[u8] = &node_index.encode();
315 let decoded = NodeIndex::decode(&mut encoded);
316 assert_eq!(node_index, decoded.unwrap());
317 }
318 }
319
320 #[test]
321 fn bool_node_map_decoding_works() {

Callers

nothing calls this directly

Calls 1

NodeIndexClass · 0.85

Tested by

no test coverage detected