()
| 1031 | |
| 1032 | #[test] |
| 1033 | fn test_atom_to_option() { |
| 1034 | let atom: Atom<Hash> = Atom::Insertion(Insertion { |
| 1035 | predecessors: vec![test_hash_position(0)], |
| 1036 | successors: vec![], |
| 1037 | flag: EdgeFlags::BLOCK, |
| 1038 | start: ChangePosition::new(0), |
| 1039 | end: ChangePosition::new(10), |
| 1040 | inode: test_hash_position(42), |
| 1041 | }); |
| 1042 | |
| 1043 | let opt_atom = atom.to_option(); |
| 1044 | assert!(opt_atom.is_new_vertex()); |
| 1045 | |
| 1046 | if let Atom::Insertion(nv) = opt_atom { |
| 1047 | assert!(nv.predecessors[0].change.is_some()); |
| 1048 | assert!(nv.inode.change.is_some()); |
| 1049 | } |
| 1050 | } |
| 1051 | } |
nothing calls this directly
no test coverage detected