()
| 878 | |
| 879 | #[test] |
| 880 | fn test_edit_json_roundtrip() { |
| 881 | let graph_op: GraphOp<Hash> = GraphOp::Edit { |
| 882 | change: Atom::Insertion(test_new_vertex()), |
| 883 | local: Local::new("src/lib.rs", 42), |
| 884 | encoding: Some(Encoding::Utf8), |
| 885 | }; |
| 886 | |
| 887 | let json = serde_json::to_string(&graph_op).unwrap(); |
| 888 | let parsed: GraphOp<Hash> = serde_json::from_str(&json).unwrap(); |
| 889 | assert_eq!(graph_op.path(), parsed.path()); |
| 890 | assert_eq!(graph_op.line(), parsed.line()); |
| 891 | } |
| 892 | |
| 893 | #[test] |
| 894 | fn test_json_roundtrip_all_types() { |
nothing calls this directly
no test coverage detected