-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excluded from report companion objects with only constants
Fixes #583
- Loading branch information
Showing
5 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ionalTest/kotlin/kotlinx/kover/gradle/plugin/test/functional/cases/ConstantObjectTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright 2017-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package kotlinx.kover.gradle.plugin.test.functional.cases | ||
|
||
import kotlinx.kover.gradle.plugin.test.functional.framework.checker.CheckerContext | ||
import kotlinx.kover.gradle.plugin.test.functional.framework.starter.TemplateTest | ||
|
||
internal class ConstantObjectTests { | ||
|
||
/** | ||
* All objects that contain only constants should be excluded from the report. | ||
*/ | ||
@TemplateTest("counters", ["koverXmlReport"]) | ||
fun CheckerContext.testBasicCounterCases() { | ||
xmlReport { | ||
classCounter("org.jetbrains.ConstantHolder").assertAbsent() | ||
classCounter("org.jetbrains.InterfaceWithCompanion${"$"}Companion").assertAbsent() | ||
classCounter("org.jetbrains.InterfaceWithNamedCompanion${"$"}Named").assertAbsent() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters