From 82d89f403308edcdf5f5ddd52f7a7a016f1f1c26 Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Thu, 11 Oct 2012 00:59:24 +0400 Subject: [PATCH] More friendly names of FileSetTestCase --- .../src/com/intellij/FileSetTestCase.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/platform/testFramework/src/com/intellij/FileSetTestCase.java b/platform/testFramework/src/com/intellij/FileSetTestCase.java index ee6196de4104..ba2afa2f8d86 100644 --- a/platform/testFramework/src/com/intellij/FileSetTestCase.java +++ b/platform/testFramework/src/com/intellij/FileSetTestCase.java @@ -75,7 +75,7 @@ public abstract class FileSetTestCase extends TestSuite { if (myPattern != null && !myPattern.matcher(file.getPath()).matches()){ return; } - final ActualTest t = new ActualTest(file); + final ActualTest t = new ActualTest(file, createTestName(file)); addTest(t); } } @@ -84,11 +84,17 @@ public abstract class FileSetTestCase extends TestSuite { return "---"; } + private static String createTestName(File testFile) { + return testFile.getName(); + } + private class ActualTest extends LightPlatformTestCase { private final File myTestFile; + private final String myTestName; - public ActualTest(File testFile) { + public ActualTest(File testFile, String testName) { myTestFile = testFile; + myTestName = testName; } @Override @@ -162,7 +168,7 @@ public abstract class FileSetTestCase extends TestSuite { @Override public String getName() { - return myTestFile.getAbsolutePath(); + return myTestName; } } }