mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
Tests: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
parent
ad9b2043dd
commit
d55f763fcd
4 changed files with 18 additions and 16 deletions
|
@ -269,8 +269,8 @@ static ErrorOr<HashMap<size_t, TestResult>> run_test_files(Span<DeprecatedString
|
|||
auto result_object_or_error = parser.parse();
|
||||
if (!result_object_or_error.is_error() && result_object_or_error.value().is_object()) {
|
||||
auto& result_object = result_object_or_error.value().as_object();
|
||||
if (auto result_string = result_object.get_ptr("result"sv); result_string && result_string->is_string()) {
|
||||
auto const& view = result_string->as_string();
|
||||
if (auto result_string = result_object.get_deprecated_string("result"sv); result_string.has_value()) {
|
||||
auto const& view = result_string.value();
|
||||
// Timeout and assert fail already are the result of the stopping test
|
||||
if (view == "timeout"sv || view == "assert_fail"sv) {
|
||||
failed = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue