From d14d7360a1855481eadb19536b86253bbc8eccdc Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 24 Mar 2023 00:19:42 +0000 Subject: [PATCH] JAL-629 Test tidyup --- src/jalview/bin/argparser/Arg.java | 32 ++++++++++++++-------------- src/jalview/gui/Desktop.java | 3 --- src/jalview/io/FileLoader.java | 2 -- test/jalview/bin/ArgParserTest.java | 1 - test/jalview/bin/CommandsTest.java | 3 --- test/jalview/gui/QuitHandlerTest.java | 2 ++ test/jalview/project/Jalview2xmlTests.java | 2 -- 7 files changed, 18 insertions(+), 27 deletions(-) diff --git a/src/jalview/bin/argparser/Arg.java b/src/jalview/bin/argparser/Arg.java index 092f5d2..6b70ab7 100644 --- a/src/jalview/bin/argparser/Arg.java +++ b/src/jalview/bin/argparser/Arg.java @@ -95,6 +95,22 @@ public enum Arg private boolean defaultBoolValue = false; + private Arg() + { + this(new String[0]); + } + + private Arg(String... names) + { + int length = (names == null || names.length == 0 + || (names.length == 1 && names[0] == null)) ? 1 + : names.length + 1; + this.argNames = new String[length]; + this.argNames[0] = this.getName(); + if (length > 1) + System.arraycopy(names, 0, this.argNames, 1, names.length); + } + public String toLongString() { StringBuilder sb = new StringBuilder(); @@ -118,22 +134,6 @@ public enum Arg return sb.toString(); } - private Arg() - { - this(new String[0]); - } - - private Arg(String... names) - { - int length = (names == null || names.length == 0 - || (names.length == 1 && names[0] == null)) ? 1 - : names.length + 1; - this.argNames = new String[length]; - this.argNames[0] = this.getName(); - if (length > 1) - System.arraycopy(names, 0, this.argNames, 1, names.length); - } - public String[] getNames() { return argNames; diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 20543af..981a060 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -2033,9 +2033,6 @@ public class Desktop extends jalview.jbgui.GDesktop } for (AlignFrame af : frames) { - System.out.println("###### frames=" + frames); - System.out.println("###### af=" + af); - System.out.println("###### af.alignPanels=" + af.alignPanels); for (AlignmentPanel ap : af.alignPanels) { if (alignmentId == null diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 3b4cc31..971aba3 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -288,8 +288,6 @@ public class FileLoader implements Runnable @Override public void run() { - System.out.println("######## Starting FileLoader.run()"); - System.out.println("######## loading file " + file); String title = protocol == DataSourceType.PASTE ? "Copied From Clipboard" : file; diff --git a/test/jalview/bin/ArgParserTest.java b/test/jalview/bin/ArgParserTest.java index d0a11fa..e93f36f 100644 --- a/test/jalview/bin/ArgParserTest.java +++ b/test/jalview/bin/ArgParserTest.java @@ -20,7 +20,6 @@ public class ArgParserTest @AfterClass(alwaysRun = true) public static void resetProps() { - // Cache.applicationProperties.clear(); Cache.loadProperties("test/jalview/testProps.jvprops"); } diff --git a/test/jalview/bin/CommandsTest.java b/test/jalview/bin/CommandsTest.java index 9458044..41588e6 100644 --- a/test/jalview/bin/CommandsTest.java +++ b/test/jalview/bin/CommandsTest.java @@ -28,7 +28,6 @@ public class CommandsTest @AfterClass(alwaysRun = true) public static void resetProps() { - // Cache.applicationProperties.clear(); Cache.loadProperties("test/jalview/testProps.jvprops"); } @@ -65,8 +64,6 @@ public class CommandsTest + "' was not found in opened alignment files: " + cmdLine); } - - System.out.println("##### GOT TO END"); } public static boolean lookForSequenceName(String sequenceName) diff --git a/test/jalview/gui/QuitHandlerTest.java b/test/jalview/gui/QuitHandlerTest.java index 299b0d1..42df90e 100644 --- a/test/jalview/gui/QuitHandlerTest.java +++ b/test/jalview/gui/QuitHandlerTest.java @@ -70,6 +70,8 @@ public class QuitHandlerTest Desktop.instance.closeAll_actionPerformed(null); // reset debug delay Jalview2XML.setDebugDelaySave(20); + // load normal testprops + Cache.loadProperties("test/jalview/testProps.jvprops"); } @BeforeMethod(alwaysRun = true) diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index 094e0ea..13df735 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -287,8 +287,6 @@ public class Jalview2xmlTests extends Jalview2xmlBase { int origCount = Desktop.getAlignFrames() == null ? 0 : Desktop.getAlignFrames().length; - System.out - .println("###### Calling FileLoader().LoadFileWaitTillLoaded"); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/exampleFile_2_7.jar", DataSourceType.FILE); assertNotNull(af, "Didn't read in the example file correctly."); -- 1.7.10.2