Skip to content

Commit 940d468

Browse files
committed
fixed += for file statistics
1 parent c706e17 commit 940d468

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/printers/CoverageAndResultsStatisticsPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ namespace printer {
8989
FileCoverageAndResultsStatistics::operator+=(const FileCoverageAndResultsStatistics &other) {
9090
totalExecutionTime += other.totalExecutionTime;
9191
totalTestsNum += other.totalTestsNum;
92-
for (auto &[status, testsNum]: testsWithStatusNum) {
93-
testsNum += CollectionUtils::getOrDefault(other.testsWithStatusNum, status, 0u);
92+
for (const auto &[status, testsNum] : other.testsWithStatusNum) {
93+
testsWithStatusNum[status] += testsNum;
9494
}
9595
fullCoverageLinesNum += other.fullCoverageLinesNum;
9696
partialCoverageLinesNum += other.partialCoverageLinesNum;

0 commit comments

Comments
 (0)