Fix name for tests.
This commit is contained in:
@@ -35,6 +35,7 @@ public final class Suite extends TranslationTest {
|
||||
this.name = testName;
|
||||
this.tester = tester;
|
||||
this.testMain = suiteDirName;
|
||||
setName(name);
|
||||
}
|
||||
|
||||
public Suite() {
|
||||
@@ -67,13 +68,15 @@ public final class Suite extends TranslationTest {
|
||||
public static Test suiteForDirectory(@NotNull final String mainName, @NotNull final SingleFileTester testMethod) {
|
||||
|
||||
return TranslatorTestCaseBuilder.suiteForDirectory(TranslationTest.TEST_FILES,
|
||||
mainName + casesDirectoryName(), true, new TranslatorTestCaseBuilder.NamedTestFactory() {
|
||||
@NotNull
|
||||
@Override
|
||||
public Test createTest(@NotNull String name) {
|
||||
return (new Suite(name, mainName, testMethod));
|
||||
}
|
||||
});
|
||||
mainName + casesDirectoryName(),
|
||||
true,
|
||||
new TranslatorTestCaseBuilder.NamedTestFactory() {
|
||||
@NotNull
|
||||
@Override
|
||||
public Test createTest(@NotNull String name) {
|
||||
return (new Suite(name, mainName, testMethod));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected static interface SingleFileTester {
|
||||
|
||||
@@ -53,6 +53,7 @@ public abstract class TranslatorTestCaseBuilder {
|
||||
public static TestSuite suiteForDirectory(String baseDataDir, @NotNull final String dataPath, boolean recursive,
|
||||
final FilenameFilter filter, @NotNull NamedTestFactory factory) {
|
||||
TestSuite suite = new TestSuite(dataPath);
|
||||
suite.setName(dataPath);
|
||||
appendTestsInDirectory(baseDataDir, dataPath, recursive, filter, factory, suite);
|
||||
return suite;
|
||||
}
|
||||
@@ -75,7 +76,8 @@ public abstract class TranslatorTestCaseBuilder {
|
||||
return extensionFilter.accept(file, s) && filter.accept(file, s);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
resultFilter = extensionFilter;
|
||||
}
|
||||
File dir = new File(baseDataDir + dataPath);
|
||||
|
||||
Reference in New Issue
Block a user