From 872dd7a439c6b3f67b754834b12637699ef81e63 Mon Sep 17 00:00:00 2001 From: James Procter Date: Sun, 17 Dec 2023 20:25:04 +0000 Subject: [PATCH] JAL-4366 account for 3dmat matrix in tests --- test/jalview/analysis/scoremodels/ScoreModelsTest.java | 8 ++++++++ test/jalview/gui/CalculationChooserTest.java | 13 +++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/test/jalview/analysis/scoremodels/ScoreModelsTest.java b/test/jalview/analysis/scoremodels/ScoreModelsTest.java index 0a3af64..eadbcb0 100644 --- a/test/jalview/analysis/scoremodels/ScoreModelsTest.java +++ b/test/jalview/analysis/scoremodels/ScoreModelsTest.java @@ -74,6 +74,14 @@ public class ScoreModelsTest assertTrue(sm instanceof SimilarityScoreModel); assertTrue(sm instanceof PairwiseScoreModelI); assertFalse(sm instanceof DistanceScoreModel); + assertEquals(sm.getName(), "Mat3di"); + assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'C'), -1f); + assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'r'), 6f); + + sm = models.next(); + assertTrue(sm instanceof SimilarityScoreModel); + assertTrue(sm instanceof PairwiseScoreModelI); + assertFalse(sm instanceof DistanceScoreModel); assertEquals(sm.getName(), "PID"); assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'C'), 0f); assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'r'), 1f); diff --git a/test/jalview/gui/CalculationChooserTest.java b/test/jalview/gui/CalculationChooserTest.java index 9835189..ceda9ec 100644 --- a/test/jalview/gui/CalculationChooserTest.java +++ b/test/jalview/gui/CalculationChooserTest.java @@ -56,21 +56,22 @@ public class CalculationChooserTest */ List filtered = CalculationChooser .getApplicableScoreModels(false, true); - assertEquals(filtered.size(), 4); + assertEquals(filtered.size(), 5); assertSame(filtered.get(0), blosum62); assertSame(filtered.get(1), pam250); - assertEquals(filtered.get(2).getName(), "PID"); - assertEquals(filtered.get(3).getName(), "Sequence Feature Similarity"); + assertEquals(filtered.get(2).getName(), "Mat3di"); + assertEquals(filtered.get(4).getName(), "Sequence Feature Similarity"); /* * peptide models for Tree are the same */ filtered = CalculationChooser.getApplicableScoreModels(false, false); - assertEquals(filtered.size(), 4); + assertEquals(filtered.size(), 5); assertSame(filtered.get(0), blosum62); assertSame(filtered.get(1), pam250); - assertEquals(filtered.get(2).getName(), "PID"); - assertEquals(filtered.get(3).getName(), "Sequence Feature Similarity"); + assertEquals(filtered.get(2).getName(), "Mat3di"); + assertEquals(filtered.get(3).getName(), "PID"); + assertEquals(filtered.get(4).getName(), "Sequence Feature Similarity"); /* * nucleotide models for PCA -- 1.7.10.2