AK+Everywhere: Store JSON object keys as String

This commit is contained in:
Timothy Flynn 2025-02-17 12:18:27 -05:00 committed by Tim Flynn
parent 70eb0ba1cd
commit e591636419
Notes: github-actions[bot] 2025-02-21 00:29:28 +00:00
23 changed files with 119 additions and 111 deletions

View file

@ -370,12 +370,12 @@ inline JSFileResult TestRunner::run_file_test(ByteString const& test_path)
file_result.logged_messages.append(message.to_string_without_side_effects().to_byte_string());
}
test_json.value().as_object().for_each_member([&](ByteString const& suite_name, JsonValue const& suite_value) {
test_json.value().as_object().for_each_member([&](String const& suite_name, JsonValue const& suite_value) {
Test::Suite suite { test_path, suite_name };
VERIFY(suite_value.is_object());
suite_value.as_object().for_each_member([&](ByteString const& test_name, JsonValue const& test_value) {
suite_value.as_object().for_each_member([&](String const& test_name, JsonValue const& test_value) {
Test::Case test { test_name, Test::Result::Fail, "", 0 };
VERIFY(test_value.is_object());
@ -427,10 +427,10 @@ inline JSFileResult TestRunner::run_file_test(ByteString const& test_path)
});
if (top_level_result.is_error()) {
Test::Suite suite { test_path, "<top-level>" };
Test::Suite suite { test_path, "<top-level>"_string };
suite.most_severe_test_result = Result::Crashed;
Test::Case test_case { "<top-level>", Test::Result::Fail, "", 0 };
Test::Case test_case { "<top-level>"_string, Test::Result::Fail, "", 0 };
auto error = top_level_result.release_error().release_value().release_value();
if (error.is_object()) {
StringBuilder detail_builder;