From: Jim Procter Date: Mon, 29 Aug 2016 11:07:13 +0000 (+0100) Subject: JAL-2154 Optional message parameter for assertDatasetNormalised X-Git-Tag: Release_2_10_0~47^2~4^2~39 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7d6cdea54be630e729dc3a7ffdf994cb51308021;p=jalview.git JAL-2154 Optional message parameter for assertDatasetNormalised --- diff --git a/test/jalview/datamodel/AlignmentTest.java b/test/jalview/datamodel/AlignmentTest.java index 58e024f..5568c8c 100644 --- a/test/jalview/datamodel/AlignmentTest.java +++ b/test/jalview/datamodel/AlignmentTest.java @@ -428,11 +428,16 @@ public class AlignmentTest * checks that the sequence data for an alignment's dataset is non-redundant. * Fails if there are sequences with same id, sequence, start, and. */ + public static void assertDatasetIsNormalised(AlignmentI al) { + assertAlignmentDatasetRefs(al, null); + } + public static void assertDatasetIsNormalised(AlignmentI al, String message) + { if (al.getDataset()!=null) { - assertDatasetIsNormalised(al.getDataset()); + assertDatasetIsNormalised(al.getDataset(), message); return; } /* @@ -461,7 +466,9 @@ public class AlignmentTest { continue; } - Assert.fail("Found similar sequences at position "+p+" and "+q+"\n"+pSeq.toString()); + Assert.fail((message == null ? "" : message + " :") + + "Found similar sequences at position " + p + " and " + q + + "\n" + pSeq.toString()); } } } @@ -1024,4 +1031,5 @@ public class AlignmentTest assertEquals(1, startEnd[0]); assertEquals(23, startEnd[1]); } + }