Skip to content

Commit

Permalink
Made LoggingTaskTests more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
shanshin committed Aug 28, 2024
1 parent 3056b73 commit 0b7846c
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal class LoggingTaskTests {
run(":koverLog") {
checkOutcome("koverPrintCoverage", "SUCCESS")
taskOutput("koverPrintCoverage") {
assertEquals("application line coverage: 57.1429%\n\n", this)
assertContains(this, "application line coverage: 57.1429%\n\n")
}
}
}
Expand All @@ -59,7 +59,7 @@ internal class LoggingTaskTests {
run(":koverLog") {
checkOutcome("koverPrintCoverage", "SUCCESS")
taskOutput("koverPrintCoverage") {
assertEquals("application line coverage: 50%\n\n", this)
assertContains(this, "application line coverage: 50%\n\n")
}
}
}
Expand All @@ -84,7 +84,7 @@ internal class LoggingTaskTests {
run(":koverLog") {
checkOutcome("koverPrintCoverage", "SUCCESS")
taskOutput("koverPrintCoverage") {
assertEquals("Custom header\nMy format for application is 57.1429\n\n", this)
assertContains(this, "Custom header\nMy format for application is 57.1429\n\n")
}
}
}
Expand Down Expand Up @@ -112,12 +112,12 @@ internal class LoggingTaskTests {
run(":koverLog") {
checkOutcome("koverPrintCoverage", "SUCCESS")
taskOutput("koverPrintCoverage") {
assertEquals(
assertContains(
this,
"Coverage for classes:\n" +
"Class org.jetbrains.ExampleClass covered instructions=5\n" +
"Class org.jetbrains.SecondClass covered instructions=5\n" +
"Class org.jetbrains.Unused covered instructions=0\n\n",
this
"Class org.jetbrains.Unused covered instructions=0\n\n"
)
}
}
Expand Down Expand Up @@ -146,12 +146,12 @@ internal class LoggingTaskTests {
run(":koverLog") {
checkOutcome("koverPrintCoverage", "SUCCESS")
taskOutput("koverPrintCoverage") {
assertEquals(
assertContains(
this,
"Coverage for classes:\n" +
"Class org.jetbrains.Unused covered instructions=0\n" +
"Class org.jetbrains.SecondClass covered instructions=7\n" +
"Class org.jetbrains.ExampleClass covered instructions=7\n\n",
this
"Class org.jetbrains.ExampleClass covered instructions=7\n\n"
)
}
}
Expand Down

0 comments on commit 0b7846c

Please sign in to comment.