JAL-3706 handle e.g. mapped exon feature extending beyond mapped range
[jalview.git] / test / jalview / datamodel / MappedFeaturesTest.java
index 5d00089..06fb303 100644 (file)
@@ -143,13 +143,20 @@ public class MappedFeaturesTest
     assertEquals(pepPos[1], 2);
     
     /*
-     * scenario: exon feature on CDS including stop codon;
+     * scenario: CDS feature on CDS including stop codon;
      */
     pepPos = mf.getMappedPositions(10, 21);
     assertEquals(pepPos[0], 1);
     assertEquals(pepPos[1], 3);
     
     /*
+     * scenario: exon feature on CDS extending beyond start and stop codons
+     */
+    pepPos = mf.getMappedPositions(2, 222);
+    assertEquals(pepPos[0], 1);
+    assertEquals(pepPos[1], 3);
+    
+    /*
      * now with the mapping from protein to CDS
      */
     mapping = new Mapping(cds, map.getInverse());