From 553ea22504037a25637e096f7c0633351c21fcaf Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Wed, 1 Dec 2021 21:45:53 +0300 Subject: [PATCH] [Native][tests] Minor. Simplify assertion expression --- .../support/group/StandardTestCaseGroupProvider.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/StandardTestCaseGroupProvider.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/StandardTestCaseGroupProvider.kt index bd58ef1b409..f33d9ba73e6 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/StandardTestCaseGroupProvider.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/StandardTestCaseGroupProvider.kt @@ -230,12 +230,7 @@ internal class StandardTestCaseGroupProvider(private val settings: Settings) : T val existingPackageName = firstMeaningfulLine?.getExistingPackageName() if (existingPackageName != null) { // Validate it. - assertTrue( - existingPackageName == basePackageName - || (existingPackageName.length > basePackageName.length - && existingPackageName.startsWith(basePackageName) - && existingPackageName[basePackageName.length] == '.') - ) { + assertTrue(existingPackageName.isSameOrSubpackageOf(basePackageName)) { val location = Location(testDataFile, firstMeaningfulLine.number) """ $location: Invalid package name declaration found: $firstMeaningfulLine