1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

LibTest: Add Test::Counts

This is the JSTestRunnerCounts struct from test-js and test-web (but
using unsigned integers - no negative counts). Not all test runners will
use all fields, but all will want to keep track of various counts.
This commit is contained in:
Linus Groh 2021-03-23 23:19:31 +01:00 committed by Andreas Kling
parent ad4cc19ca0
commit bce1f956e7

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, Matthew Olsson <matthewcolsson@gmail.com>
* Copyright (c) 2020, Linus Groh <mail@linusgroh.de>
* Copyright (c) 2020-2021, Linus Groh <mail@linusgroh.de>
* Copyright (c) 2021, Brian Gianforcaro <b.gianfo@gmail.com>
* All rights reserved.
*
@ -53,4 +53,15 @@ struct Suite {
Vector<Case> tests {};
};
struct Counts {
// Not all of these might be used by a certain test runner, e.g. some
// do not have a concept of suites, or might not load tests from files.
unsigned tests_failed { 0 };
unsigned tests_passed { 0 };
unsigned tests_skipped { 0 };
unsigned suites_failed { 0 };
unsigned suites_passed { 0 };
unsigned files_total { 0 };
};
}