()
| 884 | |
| 885 | #[test] |
| 886 | fn test_new_edge_json_roundtrip() { |
| 887 | let edge = NewEdge { |
| 888 | previous: EdgeFlags::BLOCK, |
| 889 | flag: EdgeFlags::BLOCK | EdgeFlags::DELETED, |
| 890 | from: test_hash_position(100), |
| 891 | to: GraphNode::new( |
| 892 | Hash::of(b"dest"), |
| 893 | ChangePosition::new(10), |
| 894 | ChangePosition::new(20), |
| 895 | ), |
| 896 | introduced_by: Hash::of(b"introduced"), |
| 897 | }; |
| 898 | |
| 899 | let json = serde_json::to_string(&edge).unwrap(); |
| 900 | let parsed: NewEdge<Hash> = serde_json::from_str(&json).unwrap(); |
| 901 | assert_eq!(edge, parsed); |
| 902 | } |
| 903 | |
| 904 | #[test] |
| 905 | fn test_new_edge_postcard_roundtrip() { |
nothing calls this directly
no test coverage detected