()
| 1162 | |
| 1163 | #[test] |
| 1164 | fn test_edit_json_roundtrip() { |
| 1165 | let graph_op: GraphOp<Hash> = GraphOp::Edit { |
| 1166 | change: Atom::Insertion(test_new_vertex()), |
| 1167 | local: Local::new("src/lib.rs", 42), |
| 1168 | encoding: Some(Encoding::Utf8), |
| 1169 | }; |
| 1170 | |
| 1171 | let json = serde_json::to_string(&graph_op).unwrap(); |
| 1172 | let parsed: GraphOp<Hash> = serde_json::from_str(&json).unwrap(); |
| 1173 | assert_eq!(graph_op.path(), parsed.path()); |
| 1174 | assert_eq!(graph_op.line(), parsed.line()); |
| 1175 | } |
| 1176 | |
| 1177 | #[test] |
| 1178 | fn test_json_roundtrip_all_types() { |
nothing calls this directly
no test coverage detected