From ca47f64efa144d68e7f6e01ad2c147a7832e97a7 Mon Sep 17 00:00:00 2001 From: James Procter Date: Tue, 18 Jul 2023 16:05:44 +0100 Subject: [PATCH] JAL-3855 JAL-4124 test checks asymmetric matrices are stored and restored correctly --- test/jalview/project/Jalview2xmlTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index 37f946b..6518693 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -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); -- 1.7.10.2