JAL-3070 JAL-2507 fix up test output and honour the ‘ignoreFeatures’ flag when testin...
authorJim Procter <jprocter@issues.jalview.org>
Fri, 20 Sep 2019 12:06:13 +0000 (13:06 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 20 Sep 2019 16:05:43 +0000 (17:05 +0100)
test/jalview/io/StockholmFileTest.java

index ac807e1..96c6828 100644 (file)
@@ -22,22 +22,17 @@ package jalview.io;
 
 import static org.testng.AssertJUnit.assertEquals;
 import static org.testng.AssertJUnit.assertNotNull;
-import static org.testng.AssertJUnit.assertNull;
 import static org.testng.AssertJUnit.assertTrue;
 import static org.testng.AssertJUnit.fail;
 
-import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Annotation;
-import jalview.datamodel.DBRefEntry;
-import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.gui.JvOptionPane;
 
 import java.io.File;
-import java.io.IOException;
 import java.util.Arrays;
 import java.util.BitSet;
 import java.util.HashMap;
@@ -328,10 +323,11 @@ public class StockholmFileTest
                           || (seq_original[i].getSequenceFeatures() != null && seq_new[in]
                                   .getSequenceFeatures() != null));
           // compare sequence features
-          if (seq_original[i].getSequenceFeatures() != null
+          if (!ignoreFeatures
+                  && seq_original[i].getSequenceFeatures() != null
                   && seq_new[in].getSequenceFeatures() != null)
           {
-            System.out.println("There are feature!!!");
+            System.out.println("Checking feature equivalence.");
             sequenceFeatures_original = seq_original[i]
                     .getSequenceFeatures();
             sequenceFeatures_new = seq_new[in].getSequenceFeatures();