package jalview.io;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import jalview.datamodel.AlignmentAnnotation;
}
@Test
+ public void checkNoDuplicates()
+ {
+ // not strictly a requirement, but strange things may happen if multiple
+ // instances of the same annotation are placed in the alignment annotation
+ // vector
+ assertNotNull(al.getAlignmentAnnotation());
+ // verify that all sequence annotation is doubly referenced
+ AlignmentAnnotation[] avec = al.getAlignmentAnnotation();
+ for (int p = 0; p < avec.length; p++)
+ {
+ for (int q = p + 1; q < avec.length; q++)
+ {
+ assertNotEquals(
+ "Found a duplicate annotation row " + avec[p].label,
+ avec[p], avec[q]);
+ }
+ }
+ }
+
+ @Test
public void checkAnnotationWiring()
{
assertTrue(al.getAlignmentAnnotation() != null);