re-introduce old nss im too tired for this

This commit is contained in:
wuggy 2026-06-30 06:37:32 +01:00
commit 3a838106b9
2871 changed files with 1374431 additions and 1762417 deletions

View file

@ -49,16 +49,16 @@ namespace {
class TersePrinter : public EmptyTestEventListener {
private:
// Called before any test activity starts.
void OnTestProgramStart(const UnitTest& /* unit_test */) override {}
virtual void OnTestProgramStart(const UnitTest& /* unit_test */) {}
// Called after all test activities have ended.
void OnTestProgramEnd(const UnitTest& unit_test) override {
virtual void OnTestProgramEnd(const UnitTest& unit_test) {
fprintf(stdout, "TEST %s\n", unit_test.Passed() ? "PASSED" : "FAILED");
fflush(stdout);
}
// Called before a test starts.
void OnTestStart(const TestInfo& test_info) override {
virtual void OnTestStart(const TestInfo& test_info) {
fprintf(stdout,
"*** Test %s.%s starting.\n",
test_info.test_case_name(),
@ -67,7 +67,7 @@ class TersePrinter : public EmptyTestEventListener {
}
// Called after a failed assertion or a SUCCEED() invocation.
void OnTestPartResult(const TestPartResult& test_part_result) override {
virtual void OnTestPartResult(const TestPartResult& test_part_result) {
fprintf(stdout,
"%s in %s:%d\n%s\n",
test_part_result.failed() ? "*** Failure" : "Success",
@ -78,7 +78,7 @@ class TersePrinter : public EmptyTestEventListener {
}
// Called after a test ends.
void OnTestEnd(const TestInfo& test_info) override {
virtual void OnTestEnd(const TestInfo& test_info) {
fprintf(stdout,
"*** Test %s.%s ending.\n",
test_info.test_case_name(),
@ -135,10 +135,10 @@ int main(int argc, char **argv) {
// This is an example of using the UnitTest reflection API to inspect test
// results. Here we discount failures from the tests we expected to fail.
int unexpectedly_failed_tests = 0;
for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {
const testing::TestSuite& test_suite = *unit_test.GetTestSuite(i);
for (int j = 0; j < test_suite.total_test_count(); ++j) {
const TestInfo& test_info = *test_suite.GetTestInfo(j);
for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
const TestCase& test_case = *unit_test.GetTestCase(i);
for (int j = 0; j < test_case.total_test_count(); ++j) {
const TestInfo& test_info = *test_case.GetTestInfo(j);
// Counts failed tests that were not meant to fail (those without
// 'Fails' in the name).
if (test_info.result()->Failed() &&