JAL-3365 expand range of allowed DSSP secondary structure symbols in Stockholm files
[jalview.git] / test / jalview / io / StockholmFileTest.java
index e4f2abc..b1995ab 100644 (file)
@@ -274,6 +274,11 @@ public class StockholmFileTest
     // check Alignment annotation
     AlignmentAnnotation[] aa_new = al_input.getAlignmentAnnotation();
     AlignmentAnnotation[] aa_original = al.getAlignmentAnnotation();
+    boolean expectProteinSS = !al.isNucleotide();
+    assertTrue(
+            "Alignments not both "
+                    + (al.isNucleotide() ? "nucleotide" : "protein"),
+            al_input.isNucleotide() == al.isNucleotide());
 
     // note - at moment we do not distinguish between alignment without any
     // annotation rows and alignment with no annotation row vector
@@ -292,6 +297,13 @@ public class StockholmFileTest
           assertEqualSecondaryStructure(
                   "Different alignment annotation at position " + i,
                   aa_original[i], aa_new[i], allowNullAnnotation);
+          if (aa_original[i].hasIcons)
+          {
+            assertTrue(
+                    "Secondary structure expected to be "
+                            + (expectProteinSS ? "protein" : "nucleotide"),
+                    expectProteinSS == !aa_original[i].isRNA());
+          }
           // compare graphGroup or graph properties - needed to verify JAL-1299
           assertEquals("Graph type not identical.", aa_original[i].graph,
                   aa_new[i].graph);