From 8e99071e0b49b9ee7bea92fa72d39bbf3d898f73 Mon Sep 17 00:00:00 2001 From: Vladislav Artiukhov Date: Fri, 27 Sep 2024 11:28:07 +0200 Subject: [PATCH] feat: generate Javadoc comments for `Report` via AI --- .../research/testspark/core/data/Report.kt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/core/src/main/kotlin/org/jetbrains/research/testspark/core/data/Report.kt b/core/src/main/kotlin/org/jetbrains/research/testspark/core/data/Report.kt index cbb0d731d..a91faa799 100644 --- a/core/src/main/kotlin/org/jetbrains/research/testspark/core/data/Report.kt +++ b/core/src/main/kotlin/org/jetbrains/research/testspark/core/data/Report.kt @@ -1,17 +1,26 @@ package org.jetbrains.research.testspark.core.data /** - * Storage of generated tests. Implemented on the basis of org.evosuite.utils.CompactReport structure. + * Stores generated test cases and their coverage. + * Implemented on the basis of `org.evosuite.utils.CompactReport` structure. + * + * `Report`'s member fields were created based on the fields in + * `org.evosuite.utils.CompactReport` for easier transformation. */ open class Report { // Fields were created based on the fields in org.evosuite.utils.CompactReport for easier transformation - var UUT: String = "" // Unit Under Test + /** + * Unit Under Test. This variable stores the name of the class or component that is being tested. + */ + var UUT: String = "" var allCoveredLines: Set = setOf() var allUncoveredLines: Set = setOf() var testCaseList: HashMap = hashMapOf() /** - * AllCoveredLines update + * Calculates the normalized report by updating the set of all covered lines. + * + * @return The normalized report. */ fun normalized(): Report { allCoveredLines = testCaseList.values.map { it.coveredLines }.flatten().toSet()