From 2ebdd7d2b9fce36c9768edadcd387230914e002b Mon Sep 17 00:00:00 2001 From: Dmitry Savvinov Date: Wed, 27 Mar 2019 11:42:39 +0300 Subject: [PATCH] Add platform suffix to the name of created module in tests This is needed because platform of the module is determined by the suffix after last '-' in 'createModule', and for string 'test-module' that would be 'module', which obviously doesn't make any sense. Howwever, due to how MultiTargetPlatform was implemented, it was possible to create platform with such name, and everything was fine as long as no one actually tried to switch on such a malformed "platform". After switching to more strict TargetPlatform representation, some tests that had been trying to create platforms with such names started failing. Seems that it was purely a mistake introduced in the af1264a46d5ee2dc6bbd1a58124f3929136408c8, so this commit fixes it by specifying proper module name --- .../org/jetbrains/kotlin/fir/AbstractFirDiagnosticsSmokeTest.kt | 2 +- .../org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/AbstractFirDiagnosticsSmokeTest.kt b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/AbstractFirDiagnosticsSmokeTest.kt index d7464070b14..d6d0bfd8433 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/AbstractFirDiagnosticsSmokeTest.kt +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/AbstractFirDiagnosticsSmokeTest.kt @@ -172,7 +172,7 @@ abstract class AbstractFirDiagnosticsSmokeTest : BaseDiagnosticsTest() { } protected open fun createSealedModule(): TestModuleInfo = - createModule("test-module").apply { + createModule("test-module-jvm").apply { dependencies += builtInsModuleInfo } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt index 26b8a3f3719..0ed44eded06 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt @@ -604,7 +604,7 @@ abstract class AbstractDiagnosticsTest : BaseDiagnosticsTest() { } protected open fun createSealedModule(storageManager: StorageManager): ModuleDescriptorImpl = - createModule("test-module", storageManager).apply { + createModule("test-module-jvm", storageManager).apply { setDependencies(this, builtIns.builtInsModule) }