1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 10:01:13 +09:00

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

@ -166,19 +166,19 @@ TESTJS_RUN_FILE_FUNCTION(ByteString const& test_file, JS::Realm& realm, JS::Exec
bool test_passed = true;
ByteString message;
ByteString expectation_string;
String expectation_string;
switch (expectation) {
case Early:
case Fail:
expectation_string = "File should not parse";
expectation_string = "File should not parse"_string;
test_passed = !parse_succeeded;
if (!test_passed)
message = "Expected the file to fail parsing, but it did not";
break;
case Pass:
case ExplicitPass:
expectation_string = "File should parse";
expectation_string = "File should parse"_string;
test_passed = parse_succeeded;
if (!test_passed)
message = "Expected the file to parse, but it did not";
@ -193,6 +193,6 @@ TESTJS_RUN_FILE_FUNCTION(ByteString const& test_file, JS::Realm& realm, JS::Exec
{},
duration_ms,
test_result,
{ Test::Suite { test_path, "Parse file", test_result, { { expectation_string, test_result, message, static_cast<u64>(duration_ms) * 1000u } } } }
{ Test::Suite { test_path, "Parse file"_string, test_result, { { move(expectation_string), test_result, message, static_cast<u64>(duration_ms) * 1000u } } } }
};
}