From: gmungoc Date: Thu, 18 Jan 2018 13:58:52 +0000 (+0000) Subject: JAL-2541 removed redundant test flag X-Git-Tag: Release_2_11_1_0~98^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a570c141c399cf57f096cb04933a57d441d05e51;p=jalview.git JAL-2541 removed redundant test flag --- diff --git a/test/jalview/commands/EditCommandTest.java b/test/jalview/commands/EditCommandTest.java index 9c91705..575aae5 100644 --- a/test/jalview/commands/EditCommandTest.java +++ b/test/jalview/commands/EditCommandTest.java @@ -894,7 +894,6 @@ public class EditCommandTest * and validate the resulting remaining sequence features! */ SequenceI[] sqs = new SequenceI[] { seq0 }; - boolean checkDsSize = true; for (int from = 0; from < seq0.getLength(); from++) { @@ -915,15 +914,13 @@ public class EditCommandTest copySequenceFeatures, copySeq0.getSequenceFeatures().toString()); - if (checkDsSize) - { - /* - * verify a new dataset sequence has appeared - */ - assertEquals("Wrong Dataset size after " + msg, - newDatasetSequence ? 2 : 1, alignment.getDataset() - .getHeight()); - } + /* + * verify any new dataset sequence was added to the + * alignment dataset + */ + assertEquals("Wrong Dataset size after " + msg, + newDatasetSequence ? 2 : 1, + alignment.getDataset().getHeight()); /* * undo and verify all restored @@ -936,19 +933,13 @@ public class EditCommandTest /* * verify copy alignment dataset sequence still unaffected + * and alignment dataset has shrunk (if it was added to) */ assertEquals("Original dataset sequence was modified", copySequenceFeatures, copySeq0.getSequenceFeatures().toString()); - - if (checkDsSize) - { - /* - * verify dataset sequence has shrunk - */ - assertEquals("Wrong Dataset size after Undo of " + msg, 1, - alignment.getDataset().getHeight()); - } + assertEquals("Wrong Dataset size after Undo of " + msg, 1, + alignment.getDataset().getHeight()); /* * redo and verify @@ -958,20 +949,14 @@ public class EditCommandTest /* * verify copy alignment dataset sequence unaffected + * and any new dataset sequence readded to alignment dataset */ assertEquals("Original dataset sequence was modified", copySequenceFeatures, copySeq0.getSequenceFeatures().toString()); - - if (checkDsSize) - { - /* - * verify a new dataset sequence has appeared again - */ - assertEquals("Wrong Dataset size after Redo of " + msg, - newDatasetSequence ? 2 : 1, alignment.getDataset() - .getHeight()); - } + assertEquals("Wrong Dataset size after Redo of " + msg, + newDatasetSequence ? 2 : 1, + alignment.getDataset().getHeight()); /* * undo ready for next cut @@ -980,18 +965,13 @@ public class EditCommandTest /* * final verify that copy alignment dataset sequence is still unaffected + * and that alignment dataset has shrunk */ assertEquals("Original dataset sequence was modified", copySequenceFeatures, copySeq0.getSequenceFeatures().toString()); - if (checkDsSize) - { - /* - * and that dataset sequence has shrunk - */ - assertEquals("Wrong Dataset size after final Undo of " + msg, 1, - alignment.getDataset().getHeight()); - } + assertEquals("Wrong Dataset size after final Undo of " + msg, 1, + alignment.getDataset().getHeight()); } } }