JAL-653 updating 'align as' tests to match latest tweaks to algorithm
[jalview.git] / test / jalview / analysis / AlignmentUtilsTests.java
index dd99bc2..1815eb7 100644 (file)
@@ -370,8 +370,8 @@ public class AlignmentUtilsTests
      * region). The leading gap, and the gaps between codons, are subsumed by
      * the protein alignment gap.
      */
-    checkAlignSequenceAs("-G-GG--AA-A-", "-A-L-", true, true, map,
-            "---G-GG---AA-A-");
+    checkAlignSequenceAs("-G-GG--AA-A---", "-A-L-", true, true, map,
+            "---G-GG---AA-A---");
 
     /*
      * Include only unmapped gaps in dna when realigning (outside the exon
@@ -379,7 +379,7 @@ public class AlignmentUtilsTests
      * the protein alignment gap.
      */
     checkAlignSequenceAs("-G-GG--AA-A-", "-A-L-", false, true, map,
-            "---GGG---AAA-");
+            "---GGG---AAA---");
   }
 
   /**
@@ -444,11 +444,10 @@ public class AlignmentUtilsTests
         1, 1, 3, 3 }, 3, 1);
 
     /*
-     * Expect alignment does nothing (aborts realignment). Change this test
-     * first if different behaviour wanted.
+     * -L- 'aligns' ccc------
      */
     checkAlignSequenceAs("gggAAAcccTTTggg", "-A-L-P-", false, false, map,
-            "gggAAAccc---TTTggg");
+            "gggAAAccc------TTTggg");
   }
 
   /**
@@ -549,7 +548,9 @@ public class AlignmentUtilsTests
     acf.addMap(dna1.getDatasetSequence(), prot1.getDatasetSequence(), map);
     acf.addMap(dna2.getDatasetSequence(), prot2.getDatasetSequence(), map);
     acf.addMap(dna3.getDatasetSequence(), prot3.getDatasetSequence(), map);
-    protein.setCodonFrames(new ArrayList<AlignedCodonFrame>());
+    ArrayList<AlignedCodonFrame> acfs = new ArrayList<AlignedCodonFrame>();
+    acfs.add(acf);
+    protein.setCodonFrames(acfs);
 
     /*
      * Translated codon order is [1,2,3] [1,3,4] [4,5,6] [4,5,7] [5,6,7] [7,8,9]