mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
GspJsFormatterTest: used fixed misuse of TestUtils.readInput; used Files.readAllLines instead
This commit is contained in:
@@ -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<String> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user