| 1098 | |
| 1099 | #[test] |
| 1100 | fn test_plot_cigar_from_str() { |
| 1101 | let plot_cigar = PlotCigar::from_str("16=|iAA|1T|1d").unwrap(); |
| 1102 | let expected_plot_cigar = PlotCigar(vec![ |
| 1103 | InnerPlotCigar { |
| 1104 | cigar_type: CigarType::Match, |
| 1105 | bases: None, |
| 1106 | length: Some(16), |
| 1107 | }, |
| 1108 | InnerPlotCigar { |
| 1109 | cigar_type: CigarType::Ins, |
| 1110 | bases: Some(vec!['A', 'A']), |
| 1111 | length: None, |
| 1112 | }, |
| 1113 | InnerPlotCigar { |
| 1114 | cigar_type: CigarType::Sub, |
| 1115 | bases: Some(vec!['T']), |
| 1116 | length: Some(1), |
| 1117 | }, |
| 1118 | InnerPlotCigar { |
| 1119 | cigar_type: CigarType::Del, |
| 1120 | bases: None, |
| 1121 | length: Some(1), |
| 1122 | }, |
| 1123 | ]); |
| 1124 | assert_eq!(plot_cigar, expected_plot_cigar); |
| 1125 | } |
| 1126 | |
| 1127 | #[test] |
| 1128 | fn test_empty_aux_record() { |