JAL-3855 JAL-4124 test checks asymmetric matrices are stored and restored correctly
authorJames Procter <j.procter@dundee.ac.uk>
Tue, 18 Jul 2023 15:05:44 +0000 (16:05 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Tue, 18 Jul 2023 15:07:00 +0000 (16:07 +0100)
test/jalview/project/Jalview2xmlTests.java

index 37f946b..6518693 100644 (file)
@@ -1563,7 +1563,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
       {
         paevals[i][j] = ((i - j < 2)
                 || ((i > 1 && i < 5) && (j > 1 && i < 5))) ? 1 : 0f;
-        paevals[j][i] = paevals[i][j];
+        paevals[j][i] = -paevals[i][j];
       }
     }
     PAEContactMatrix dummyMat = new PAEContactMatrix(sq, paevals);
@@ -1573,6 +1573,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     float[][] vals = ContactMatrix.fromFloatStringToContacts(content,
             sq.getLength(), sq.getLength());
     assertEquals(vals[3][4], paevals[3][4]);
+    assertEquals(vals[4][3], paevals[4][3]);
     dummyMat.setGroupSet(GroupSet.makeGroups(dummyMat, 0.5f, false));
     Assert.assertNotSame(dummyMat.getNewick(), "");
     AlignmentAnnotation paeCm = sq.addContactList(dummyMat);