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
af1264a46d, so this commit fixes it by
specifying proper module name
This commit is contained in:
Dmitry Savvinov
2019-03-27 11:42:39 +03:00
parent d5fbe59a3e
commit 2ebdd7d2b9
2 changed files with 2 additions and 2 deletions
@@ -172,7 +172,7 @@ abstract class AbstractFirDiagnosticsSmokeTest : BaseDiagnosticsTest() {
}
protected open fun createSealedModule(): TestModuleInfo =
createModule("test-module").apply {
createModule("test-module-jvm").apply {
dependencies += builtInsModuleInfo
}
@@ -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)
}