Test kotlinx-metadata and kotlinp on compiler test data

#KT-23198
This commit is contained in:
Alexander Udalov
2018-03-19 19:39:49 +01:00
parent bef759161f
commit 9dbeb79340
2 changed files with 62 additions and 2 deletions
@@ -406,12 +406,17 @@ public class KotlinTestUtils {
}
@NotNull
public static File tmpDirForTest(TestCase test) throws IOException {
File answer = normalizeFile(FileUtil.createTempDirectory(test.getClass().getSimpleName(), test.getName()));
public static File tmpDirForTest(@NotNull String testClassName, @NotNull String testName) throws IOException {
File answer = normalizeFile(FileUtil.createTempDirectory(testClassName, testName));
deleteOnShutdown(answer);
return answer;
}
@NotNull
public static File tmpDirForTest(TestCase test) throws IOException {
return tmpDirForTest(test.getClass().getSimpleName(), test.getName());
}
@NotNull
public static File tmpDir(String name) throws IOException {
// We should use this form. otherwise directory will be deleted on each test.