JAL-1994 fix for broken tests
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 26 Feb 2016 10:41:27 +0000 (10:41 +0000)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 26 Feb 2016 10:41:27 +0000 (10:41 +0000)
src/jalview/viewmodel/AlignmentViewport.java
test/jalview/analysis/TestAlignSeq.java

index 7bbe677..3c69961 100644 (file)
@@ -1557,7 +1557,9 @@ public abstract class AlignmentViewport implements AlignViewportI,
     }
     else
     {
-      if (alignment.getHiddenSequences() != null)
+      HiddenSequences hiddenSeqs = alignment.getHiddenSequences();
+      if (hiddenSeqs != null && hiddenSeqs.hiddenSequences != null
+              && hiddenSeqs.hiddenSequences.length > 0)
       {
         iSize = alignment.getHiddenSequences().getFullAlignment()
                 .getHeight();
index d6342ef..43ebd63 100644 (file)
@@ -119,7 +119,7 @@ public class TestAlignSeq
     String expected = "Score = 320\nLength of alignment = 10\nSequence Seq1 :  3 - 18 (Sequence length = 14)\nSequence Seq1 :  1 - 10 (Sequence length = 10)\n\n"
             + "Seq1 SDFAQQQRRR\n"
             + "     |||||||   \n"
-            + "Seq1 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n\n";
+            + "Seq1 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n";
     assertEquals(expected, baos.toString());
   }
 }