Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorLeitwolf112026-11-13 19:29:35 +0300
committerLeitwolf112026-11-13 19:29:35 +0300
commit55dab34729c14c9019b7062fccd11fc22372e805 (patch)
treea36e7ef58c8d2161ec929c578f29ca12876eab9e /src
parent17248837a78462596809f902dd47cf113a39670b (diff)
downloadcatch3-55dab34729c14c9019b7062fccd11fc22372e805.tar.gz
Convert LCOV line numbers explicitly and refresh the amalgamation
- The 32-bit MSVC jobs failed on C4244: ParseLcov used the uint64_t it read as a std::size_t map key. The line number is now converted once, explicitly, before it is used. - extras/catch_amalgamated.cpp is regenerated with bazelisk run //tools:amalgamate, so it holds CoverageReport and the scheduler changes; bazel run //tools:check passes locally.
Diffstat (limited to 'src')
-rw-r--r--src/Progmasoft/Runner/CoverageReport.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Progmasoft/Runner/CoverageReport.cpp b/src/Progmasoft/Runner/CoverageReport.cpp
index c443c158..68d6e5ee 100644
--- a/src/Progmasoft/Runner/CoverageReport.cpp
+++ b/src/Progmasoft/Runner/CoverageReport.cpp
@@ -300,7 +300,7 @@ namespace Progmasoft::Catch3::Runner
= fields.size() > 1 ? Number(fields[1]) : std::nullopt;
if (number && count)
{
- current->lines[*number] += *count;
+ current->lines[static_cast<std::size_t>(*number)] += *count;
}
}
else if (current != nullptr && line.substr(0, 5) == "BRDA:")
@@ -310,22 +310,23 @@ namespace Progmasoft::Catch3::Runner
{
continue;
}
- const auto number = Number(fields[0]);
- if (!number)
+ const auto parsed = Number(fields[0]);
+ if (!parsed)
{
continue;
}
+ const auto number = static_cast<std::size_t>(*parsed);
// The branches of a line are numbered in the order they come;
// `-` counts as never taken.
std::size_t index = 0;
- for (auto it = current->branches.lower_bound({ *number, 0 });
+ for (auto it = current->branches.lower_bound({ number, 0 });
it != current->branches.end()
- && it->first.first == *number;
+ && it->first.first == number;
++it)
{
++index;
}
- current->branches[{ *number, index }]
+ current->branches[{ number, index }]
+= Number(fields[3]).value_or(0);
}
}