File tree Expand file tree Collapse file tree 5 files changed +48
-3
lines changed
kover-features-jvm/src/main/java/kotlinx/kover/features/jvm/impl
kotlin/kotlinx/kover/gradle/plugin/test/functional/cases
templates/builds/counters/src/main/kotlin
main/kotlin/kotlinx/kover/gradle/plugin/dsl Expand file tree Collapse file tree 5 files changed +48
-3
lines changed Original file line number Diff line number Diff line change 11[versions ]
22
3- intellij-coverage = " 1.0.748 "
3+ intellij-coverage = " 1.0.752 "
44junit = " 5.9.0"
55kotlinx-bcv = " 0.13.2"
66kotlinx-dokka = " 1.8.10"
Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ internal fun ClassFilters.convert(): Filters {
1212 return Filters (
1313 convert(includeClasses),
1414 convert(excludeClasses),
15- convert(excludeAnnotation)
15+ emptyList(),
16+ convert(excludeAnnotation),
17+ emptyList(),
18+ emptyList()
1619 )
1720}
1821
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2017-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3+ */
4+
5+ package kotlinx.kover.gradle.plugin.test.functional.cases
6+
7+ import kotlinx.kover.gradle.plugin.test.functional.framework.checker.CheckerContext
8+ import kotlinx.kover.gradle.plugin.test.functional.framework.starter.TemplateTest
9+
10+ internal class ConstantObjectTests {
11+
12+ /* *
13+ * All objects that contain only constants should be excluded from the report.
14+ */
15+ @TemplateTest(" counters" , [" koverXmlReport" ])
16+ fun CheckerContext.testBasicCounterCases () {
17+ xmlReport {
18+ classCounter(" org.jetbrains.ConstantHolder" ).assertAbsent()
19+ classCounter(" org.jetbrains.InterfaceWithCompanion${" $" } Companion" ).assertAbsent()
20+ classCounter(" org.jetbrains.InterfaceWithNamedCompanion${" $" } Named" ).assertAbsent()
21+ }
22+ }
23+ }
Original file line number Diff line number Diff line change @@ -56,3 +56,22 @@ object UsedObjectFun {
5656 println (" Hello" )
5757 }
5858}
59+
60+ object ConstantHolder {
61+ const val STRING_CONST = " STRING_CONST"
62+ const val INT_CONST = 42
63+ }
64+
65+ interface InterfaceWithCompanion {
66+ companion object {
67+ const val STRING_CONST = " STRING_CONST"
68+ const val INT_CONST = 42
69+ }
70+ }
71+
72+ interface InterfaceWithNamedCompanion {
73+ companion object Named {
74+ const val STRING_CONST = " STRING_CONST"
75+ const val INT_CONST = 42
76+ }
77+ }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public object KoverVersions {
1717 /* *
1818 * Kover coverage tool version.
1919 */
20- public const val KOVER_TOOL_VERSION = " 1.0.748 "
20+ public const val KOVER_TOOL_VERSION = " 1.0.752 "
2121
2222 /* *
2323 * JaCoCo coverage tool version used by default.
You can’t perform that action at this time.
0 commit comments