From: Jim Procter Date: Tue, 3 Sep 2024 14:15:32 +0000 (+0100) Subject: JAL-4366 fix up tests X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c0a73924b679c42e7d9de3237fa0f6f0d6859f57;p=jalview.git JAL-4366 fix up tests --- diff --git a/src/jalview/analysis/scoremodels/SecondaryStructureDistanceModel.java b/src/jalview/analysis/scoremodels/SecondaryStructureDistanceModel.java index 473abcf..0a602f5 100644 --- a/src/jalview/analysis/scoremodels/SecondaryStructureDistanceModel.java +++ b/src/jalview/analysis/scoremodels/SecondaryStructureDistanceModel.java @@ -394,7 +394,7 @@ public class SecondaryStructureDistanceModel extends DistanceScoreModel @Override public boolean isProtein() { - return false; + return true; } @Override diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index c9e999a..6d77f04 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -661,8 +661,8 @@ public class CalculationChooser extends JPanel for (ScoreModelI sm : scoreModels.getModels()) { if ((!forPasimap || sm instanceof ScoreMatrix) - && (!nucleotide && sm.isProtein() || nucleotide && sm.isDNA() - || sm.isSecondaryStructure() && ssPresent)) + && ((!nucleotide && sm.isProtein()) || (nucleotide && sm.isDNA())) + && (!sm.isSecondaryStructure() || ssPresent)) { filtered.add(sm); diff --git a/test/jalview/gui/CalculationChooserTest.java b/test/jalview/gui/CalculationChooserTest.java index 3ee12cf..3d7e03e 100644 --- a/test/jalview/gui/CalculationChooserTest.java +++ b/test/jalview/gui/CalculationChooserTest.java @@ -76,7 +76,7 @@ public class CalculationChooserTest assertEquals(filtered.get(2).getName(), "Mat3di"); assertEquals(filtered.get(3).getName(), "PID"); assertEquals(filtered.get(4).getName(), "Sequence Feature Similarity"); - assertEquals(filtered.get(4).getName(), + assertEquals(filtered.get(5).getName(), "Secondary Structure Similarity"); @@ -137,7 +137,7 @@ public class CalculationChooserTest assertEquals(CalculationChooser .getApplicableScoreModels(isDna, isPca, isSS, true).size(), - (isDna) ? 1 : 2); + (isDna) ? 1 : 3); } } }