Skip to content

Commit bc11514

Browse files
mmvpmtamarinvs19
authored andcommitted
Add toString method to GlobalStats in ContestEstimator (#1599)
1 parent 0c587db commit bc11514

File tree

1 file changed

+5
-2
lines changed
  • utbot-junit-contest/src/main/kotlin/org/utbot/contest

1 file changed

+5
-2
lines changed

utbot-junit-contest/src/main/kotlin/org/utbot/contest/Statistics.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ fun <T> Iterable<T>.printMultiline(printer: (T) -> Any?) = "\n" + joinToString("
1414
class GlobalStats {
1515
val projectStats = mutableListOf<StatsForProject>()
1616
var duration: Long? = null
17+
18+
override fun toString(): String = "\n<Global statistics> :" +
19+
projectStats.joinToString(separator = "\n")
1720
}
1821

1922
class StatsForProject(val project: String) {
@@ -72,7 +75,7 @@ class StatsForProject(val project: String) {
7275
else this
7376
}
7477

75-
override fun toString(): String = "\n<Global statistics> :" +
78+
override fun toString(): String = "\n<StatsForProject($project)> :" +
7679
"\n\t#classes for generation = $classesForGeneration" +
7780
"\n\t#tc generated = $testCasesGenerated" +
7881
"\n\t#classes without problems = $classesWithoutProblems" +
@@ -139,7 +142,7 @@ class StatsForClass(val project: String, val className: String) {
139142
fun getConcolicCoverageInfo(): CoverageStatistic =
140143
concolicCoverage.getCoverageInfo(testedClassNames)
141144

142-
override fun toString(): String = "\n<StatsForClass> :" +
145+
override fun toString(): String = "\n<StatsForClass($className)> :" +
143146
"\n\tcanceled by timeout = $canceledByTimeout" +
144147
"\n\t#methods = $methodsCount, " +
145148
"\n\t#methods started symbolic exploration = ${statsForMethods.size}" +

0 commit comments

Comments
 (0)