From 598e89c03d7114f6054e1a7aa4b7e81886ffa1e5 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 17 May 2018 12:43:30 +0200 Subject: [PATCH] Update bunch files for KotlinTestUtils after 9dbeb79340 --- .../org/jetbrains/kotlin/test/KotlinTestUtils.java.173 | 9 +++++++-- .../org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 | 9 +++++++-- .../org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.173 b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.173 index 2e95577877a..c6d5f1b4edc 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.173 +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.173 @@ -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. diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 index fb68d356d53..519dc51dd80 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 @@ -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. diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 index 0ee6a12ff24..56752f08643 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 @@ -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.