From 0a71dbfc82dc7cfcfd888c0e46025bbcd69c6b27 Mon Sep 17 00:00:00 2001 From: Fotis Xenakis Date: Tue, 9 Apr 2019 18:37:35 +0300 Subject: [PATCH] Tiny rework of exiting in tests. This unmasks failing tests in UmlDocTest. --- src/test/java/org/umlgraph/test/BasicTest.java | 2 +- src/test/java/org/umlgraph/test/UmlDocTest.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/umlgraph/test/BasicTest.java b/src/test/java/org/umlgraph/test/BasicTest.java index 1dceb13f..5eef6e3b 100644 --- a/src/test/java/org/umlgraph/test/BasicTest.java +++ b/src/test/java/org/umlgraph/test/BasicTest.java @@ -58,13 +58,13 @@ public static void main(String[] args) throws IOException { for (String className : differences) { pw.println(className); } + System.exit(1); } else { pw.println("GOOD, all files are structurally equal"); } pw.println(); pw.println(); pw.flush(); - System.exit(differences.size() > 0 ? 1 : 0); } private static void performViewTests(List differences, File outFolder) diff --git a/src/test/java/org/umlgraph/test/UmlDocTest.java b/src/test/java/org/umlgraph/test/UmlDocTest.java index 9afbb33c..971224bf 100644 --- a/src/test/java/org/umlgraph/test/UmlDocTest.java +++ b/src/test/java/org/umlgraph/test/UmlDocTest.java @@ -145,11 +145,10 @@ private static void compareDocletOutputs(List differences, File refFolde private static void runDoclet(String[] options) { pw.print("Run javadoc -doclet " + doclet); for (String o : options) - pw.print(" " + o); + pw.print(o + " "); pw.println(); com.sun.tools.javadoc.Main.execute("UMLDoc test", pw, pw, pw, doclet, options); - System.exit(0); } }