1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

Userland+Tests: Split out generic test runner from JS TestRunner

Split out the functionality to gather multiple tests from the filesystem
and run them in turn into Test::TestRunner, and leave the JavaScript
specific test harness logic in Test::JS::TestRunner and friends.
This commit is contained in:
Andrew Kaster 2021-06-27 12:57:35 -06:00 committed by Ali Mohammad Pur
parent 44a6715584
commit 601c9e89de
4 changed files with 287 additions and 237 deletions

View file

@ -63,7 +63,7 @@ TESTJS_RUN_FILE_FUNCTION(const String& test_file, JS::Interpreter&)
if (!test262_parser_tests)
return Test::JS::RunFileHookResult::RunAsNormal;
auto start_time = Test::JS::get_time_in_ms();
auto start_time = Test::get_time_in_ms();
LexicalPath path(test_file);
auto& dirname = path.dirname();
@ -112,7 +112,7 @@ TESTJS_RUN_FILE_FUNCTION(const String& test_file, JS::Interpreter&)
return Test::JS::JSFileResult {
LexicalPath::relative_path(test_file, Test::JS::g_test_root),
{},
Test::JS::get_time_in_ms() - start_time,
Test::get_time_in_ms() - start_time,
test_result,
{ Test::Suite { "Parse file", test_result, { { expectation_string, test_result, message } } } }
};