()
| 1005 | |
| 1006 | #[test] |
| 1007 | fn test_edge_map_many_edges() { |
| 1008 | let mut em = EdgeUpdate::<Hash>::new(test_hash_position(0)); |
| 1009 | |
| 1010 | for i in 0..100 { |
| 1011 | em.push(NewEdge { |
| 1012 | previous: EdgeFlags::BLOCK, |
| 1013 | flag: EdgeFlags::DELETED, |
| 1014 | from: test_hash_position(i), |
| 1015 | to: GraphNode::new( |
| 1016 | Hash::of(&[i as u8]), |
| 1017 | ChangePosition::new(0), |
| 1018 | ChangePosition::new(1), |
| 1019 | ), |
| 1020 | introduced_by: Hash::of(b"intro"), |
| 1021 | }); |
| 1022 | } |
| 1023 | |
| 1024 | assert_eq!(em.len(), 100); |
| 1025 | |
| 1026 | // Verify serialization still works |
| 1027 | let bytes = postcard::to_allocvec(&em).unwrap(); |
| 1028 | let parsed: EdgeUpdate<Hash> = postcard::from_bytes(&bytes).unwrap(); |
| 1029 | assert_eq!(em, parsed); |
| 1030 | } |
| 1031 | |
| 1032 | #[test] |
| 1033 | fn test_atom_to_option() { |
nothing calls this directly
no test coverage detected