From 126907b3b8e92e2b755aaddec19ea4dea516fb1e Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Wed, 4 Jul 2018 14:28:11 +0700 Subject: [PATCH] GspJsFormatterTest: used fixed misuse of TestUtils.readInput; used Files.readAllLines instead --- .../test/org/jetbrains/plugins/groovy/util/TestUtils.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/util/TestUtils.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/util/TestUtils.java index db8fd976e76c..482ca7c44a73 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/util/TestUtils.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/util/TestUtils.java @@ -144,6 +144,12 @@ public abstract class TestUtils { return text.substring(0, index) + text.substring(index + END_MARKER.length()); } + /** + * Reads input file which consists at least of two sections separated with "-----" line + * @param filePath file to read + * @return a list of sections read from the file + * @throws RuntimeException if any IO problem occurs + */ public static List readInput(String filePath) { String content; try { @@ -211,7 +217,7 @@ public abstract class TestUtils { } if (missedVariants.size() > 0) { - Assert.assertTrue("Some completion variants are missed " + missedVariants, false); + Assert.fail("Some completion variants are missed " + missedVariants); } }