From 2f4163ece633c3d4e6865b81de16371755ec95be Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Thu, 21 Sep 2017 15:14:55 +0300 Subject: [PATCH] unit-tests: Fix filenames for Windows --- .../org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt index 9f82f561166..d32416881b8 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt @@ -65,7 +65,8 @@ internal class TestProcessor (val context: KonanBackendContext): FileLoweringPas .mapIndexed { i, it -> if (i != 0) it.capitalize() else it } .joinToString("")}\$test\$${testSuiteCnt++}".synthesizedName - private val IrFile.fileName get() = name.substringAfterLast(File.separatorChar) + // IrFile always uses a forward slash as a directory separator. + private val IrFile.fileName get() = name.substringAfterLast('/') private val IrFile.topLevelSuiteName get() = "Tests in file: $fileName" private fun MutableList.registerFunction(