From 71f765417da24e3296824000d0841ba640ec58d3 Mon Sep 17 00:00:00 2001 From: Nikita Stroganov Date: Tue, 27 Dec 2022 17:30:01 +0300 Subject: [PATCH] Add toString method to GlobalStats in ContestEstimator --- .../src/main/kotlin/org/utbot/contest/Statistics.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Statistics.kt b/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Statistics.kt index f3ac113226..16918a8e4c 100644 --- a/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Statistics.kt +++ b/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Statistics.kt @@ -14,6 +14,9 @@ fun Iterable.printMultiline(printer: (T) -> Any?) = "\n" + joinToString(" class GlobalStats { val projectStats = mutableListOf() var duration: Long? = null + + override fun toString(): String = "\n :" + + projectStats.joinToString(separator = "\n") } class StatsForProject(val project: String) { @@ -72,7 +75,7 @@ class StatsForProject(val project: String) { else this } - override fun toString(): String = "\n :" + + override fun toString(): String = "\n :" + "\n\t#classes for generation = $classesForGeneration" + "\n\t#tc generated = $testCasesGenerated" + "\n\t#classes without problems = $classesWithoutProblems" + @@ -139,7 +142,7 @@ class StatsForClass(val project: String, val className: String) { fun getConcolicCoverageInfo(): CoverageStatistic = concolicCoverage.getCoverageInfo(testedClassNames) - override fun toString(): String = "\n :" + + override fun toString(): String = "\n :" + "\n\tcanceled by timeout = $canceledByTimeout" + "\n\t#methods = $methodsCount, " + "\n\t#methods started symbolic exploration = ${statsForMethods.size}" +