1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:57:34 +00:00

LibTest: Add support for xfail JavaScriptTestRunner tests

This is meant to be used in a similar manner to skipping tests, with the
extra advantage that if the test begins passing unexpectedly, the test
will fail.

Being notified of unexpected passes allows for the test to be updated to
the correct expectation.
This commit is contained in:
Shannon Booth 2023-07-22 19:39:31 +12:00 committed by Andreas Kling
parent 2c06ad3a05
commit af60c740e3
4 changed files with 32 additions and 4 deletions

View file

@ -2,6 +2,7 @@
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
* Copyright (c) 2020-2021, Linus Groh <linusg@serenityos.org>
* Copyright (c) 2021, Brian Gianforcaro <bgianf@serenityos.org>
* Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -17,6 +18,7 @@ enum class Result {
Pass,
Fail,
Skip,
ExpectedFail,
Crashed,
};
@ -42,6 +44,7 @@ struct Counts {
unsigned tests_failed { 0 };
unsigned tests_passed { 0 };
unsigned tests_skipped { 0 };
unsigned tests_expected_failed { 0 };
unsigned suites_failed { 0 };
unsigned suites_passed { 0 };
unsigned files_total { 0 };