()
| 924 | |
| 925 | #[test] |
| 926 | fn test_atom_json_roundtrip() { |
| 927 | let atom: Atom<Hash> = Atom::Insertion(Insertion { |
| 928 | predecessors: vec![], |
| 929 | successors: vec![], |
| 930 | flag: EdgeFlags::BLOCK, |
| 931 | start: ChangePosition::new(0), |
| 932 | end: ChangePosition::new(10), |
| 933 | inode: test_hash_position(0), |
| 934 | }); |
| 935 | |
| 936 | let json = serde_json::to_string(&atom).unwrap(); |
| 937 | let parsed: Atom<Hash> = serde_json::from_str(&json).unwrap(); |
| 938 | assert!(parsed.is_new_vertex()); |
| 939 | assert_eq!(atom, parsed); |
| 940 | } |
| 941 | |
| 942 | #[test] |
| 943 | fn test_atom_edge_map_json_roundtrip() { |
nothing calls this directly
no test coverage detected