[Native][tests] Minor. Simplify StandardTestCaseGroupProvider.runForFirstMeaningfulStatement()

This commit is contained in:
Dmitriy Dolovov
2021-11-12 17:43:02 +03:00
parent 0e1c60d5ab
commit c014daf1b2
@@ -243,14 +243,13 @@ internal class StandardTestCaseGroupProvider(private val environment: TestEnviro
when {
inMultilineComment -> inMultilineComment = !trimmedLine.endsWith("*/")
trimmedLine.startsWith("/*") -> inMultilineComment = true
trimmedLine.isEmpty() -> Unit
trimmedLine.startsWith("//") -> Unit
trimmedLine.startsWith("@file:") -> Unit
else -> {
trimmedLine.isMeaningfulLine() -> {
action(lineNumber, line)
break
}
}
}
}
private fun String.isMeaningfulLine() = isNotEmpty() && !startsWith("//") && !startsWith("@file:")
}