()
| 1177 | |
| 1178 | #[test] |
| 1179 | fn test_edit_json_roundtrip() { |
| 1180 | let graph_op: GraphOp<Hash> = GraphOp::Edit { |
| 1181 | change: Atom::Insertion(test_new_vertex()), |
| 1182 | local: Local::new("src/lib.rs", 42), |
| 1183 | encoding: Some(Encoding::Utf8), |
| 1184 | }; |
| 1185 | |
| 1186 | let json = serde_json::to_string(&graph_op).unwrap(); |
| 1187 | let parsed: GraphOp<Hash> = serde_json::from_str(&json).unwrap(); |
| 1188 | assert_eq!(graph_op.path(), parsed.path()); |
| 1189 | assert_eq!(graph_op.line(), parsed.line()); |
| 1190 | } |
| 1191 | |
| 1192 | #[test] |
| 1193 | fn test_json_roundtrip_all_types() { |
nothing calls this directly
no test coverage detected