Skip to content

Commit 279b385

Browse files
trflynn89linusg
authored andcommitted
Fix compilation of test runner after removal of StringView(char const*)
1 parent b469c60 commit 279b385

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ static Result<TestMetadata, String> extract_metadata(StringView source)
374374
metadata.is_async = true;
375375
}
376376
}
377-
} else if (line.starts_with("includes:")) {
377+
} else if (line.starts_with("includes:"sv)) {
378378
auto files = parse_list(line);
379379
if (files.is_empty()) {
380380
parsing_includes_list = true;
@@ -705,7 +705,7 @@ int main(int argc, char** argv)
705705

706706
passed = verify_test(result, metadata, result_object);
707707
if (metadata.is_async && !s_parse_only) {
708-
if (!first_output.contains("Test262:AsyncTestComplete") || first_output.contains("Test262:AsyncTestFailure")) {
708+
if (!first_output.contains("Test262:AsyncTestComplete"sv) || first_output.contains("Test262:AsyncTestFailure"sv)) {
709709
result_object.set("async_fail", true);
710710
if (first_output.is_null())
711711
result_object.set("output", JsonValue { AK::JsonValue::Type::Null });
@@ -728,7 +728,7 @@ int main(int argc, char** argv)
728728

729729
passed = verify_test(result, metadata, result_object);
730730
if (metadata.is_async && !s_parse_only) {
731-
if (!first_output.contains("Test262:AsyncTestComplete") || first_output.contains("Test262:AsyncTestFailure")) {
731+
if (!first_output.contains("Test262:AsyncTestComplete"sv) || first_output.contains("Test262:AsyncTestFailure"sv)) {
732732
result_object.set("async_fail", true);
733733
if (first_output.is_null())
734734
result_object.set("output", JsonValue { AK::JsonValue::Type::Null });
@@ -739,10 +739,10 @@ int main(int argc, char** argv)
739739
}
740740

741741
if (passed)
742-
result_object.remove("strict_mode");
742+
result_object.remove("strict_mode"sv);
743743

744-
if (!result_object.has("result"))
745-
result_object.set("result", passed ? "passed" : "failed");
744+
if (!result_object.has("result"sv))
745+
result_object.set("result"sv, passed ? "passed"sv : "failed"sv);
746746
}
747747

748748
s_current_test = "";

0 commit comments

Comments
 (0)