Merge xqa-02-runner-count: count failures independently of retention (X-QA-02)

This commit is contained in:
faumaray committed 2026-12-03 16:42:31 +03:00
commit 2501c4d7ac
4 files changed
+36 -6

No files matched your search

@@ -67,6 +67,30 @@ Void::Testing::Test testing_failure_capture_and_bounded_assertions()
}
}
Void::Testing::Test testing_runner_counts_failure_after_retention_cap()
{
using namespace Void::Testing;
// A failure recorded after kMaxRetainedAssertionsPerTest is dropped from the
// bounded assertion report, but it must still fail the executed test.
TestCase tc{
.run =
[] {
for (std::size_t i = 0; i < kMaxRetainedAssertionsPerTest; ++i) {
expect(true);
}
expect(false);
},
.name = "failure_after_retention_cap",
.suite = "HardeningRunner",
};
const TestResult res = Runner::instance().execute_case(tc);
expect(res.state == TestState::Failed);
expect(res.assertions_truncated);
expect_eq(res.assertions.size(), kMaxRetainedAssertionsPerTest);
expect_eq(res.dropped_assertions, std::size_t{1});
}
Void::Testing::Test testing_fixture_single_teardown_and_cleanup_error()
{
using namespace Void::Testing;