mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 11:54:57 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -20,13 +20,13 @@ namespace JS {
|
|||
RefPtr<::JS::VM> g_vm;
|
||||
bool g_collect_on_every_allocation = false;
|
||||
bool g_run_bytecode = false;
|
||||
String g_currently_running_test;
|
||||
HashMap<String, FunctionWithLength> s_exposed_global_functions;
|
||||
DeprecatedString g_currently_running_test;
|
||||
HashMap<DeprecatedString, FunctionWithLength> s_exposed_global_functions;
|
||||
Function<void()> g_main_hook;
|
||||
Function<NonnullOwnPtr<JS::Interpreter>()> g_create_interpreter_hook;
|
||||
HashMap<bool*, Tuple<String, String, char>> g_extra_args;
|
||||
IntermediateRunFileResult (*g_run_file)(String const&, JS::Interpreter&, JS::ExecutionContext&) = nullptr;
|
||||
String g_test_root;
|
||||
HashMap<bool*, Tuple<DeprecatedString, DeprecatedString, char>> g_extra_args;
|
||||
IntermediateRunFileResult (*g_run_file)(DeprecatedString const&, JS::Interpreter&, JS::ExecutionContext&) = nullptr;
|
||||
DeprecatedString g_test_root;
|
||||
int g_test_argc;
|
||||
char** g_test_argv;
|
||||
|
||||
|
@ -89,8 +89,8 @@ int main(int argc, char** argv)
|
|||
bool print_json = false;
|
||||
bool per_file = false;
|
||||
char const* specified_test_root = nullptr;
|
||||
String common_path;
|
||||
String test_glob;
|
||||
DeprecatedString common_path;
|
||||
DeprecatedString test_glob;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.add_option(print_times, "Show duration of each test", "show-time", 't');
|
||||
|
@ -124,7 +124,7 @@ int main(int argc, char** argv)
|
|||
if (per_file)
|
||||
print_json = true;
|
||||
|
||||
test_glob = String::formatted("*{}*", test_glob);
|
||||
test_glob = DeprecatedString::formatted("*{}*", test_glob);
|
||||
|
||||
if (getenv("DISABLE_DBG_OUTPUT")) {
|
||||
AK::set_debug_enabled(false);
|
||||
|
@ -135,21 +135,21 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
String test_root;
|
||||
DeprecatedString test_root;
|
||||
|
||||
if (specified_test_root) {
|
||||
test_root = String { specified_test_root };
|
||||
test_root = DeprecatedString { specified_test_root };
|
||||
} else {
|
||||
#ifdef AK_OS_SERENITY
|
||||
test_root = LexicalPath::join("/home/anon/Tests"sv, String::formatted("{}-tests", program_name.split_view('-').last())).string();
|
||||
test_root = LexicalPath::join("/home/anon/Tests"sv, DeprecatedString::formatted("{}-tests", program_name.split_view('-').last())).string();
|
||||
#else
|
||||
char* serenity_source_dir = getenv("SERENITY_SOURCE_DIR");
|
||||
if (!serenity_source_dir) {
|
||||
warnln("No test root given, {} requires the SERENITY_SOURCE_DIR environment variable to be set", g_program_name);
|
||||
return 1;
|
||||
}
|
||||
test_root = String::formatted("{}/{}", serenity_source_dir, g_test_root_fragment);
|
||||
common_path = String::formatted("{}/Userland/Libraries/LibJS/Tests/test-common.js", serenity_source_dir);
|
||||
test_root = DeprecatedString::formatted("{}/{}", serenity_source_dir, g_test_root_fragment);
|
||||
common_path = DeprecatedString::formatted("{}/Userland/Libraries/LibJS/Tests/test-common.js", serenity_source_dir);
|
||||
#endif
|
||||
}
|
||||
if (!Core::File::is_directory(test_root)) {
|
||||
|
@ -166,7 +166,7 @@ int main(int argc, char** argv)
|
|||
warnln("No test root given, {} requires the SERENITY_SOURCE_DIR environment variable to be set", g_program_name);
|
||||
return 1;
|
||||
}
|
||||
common_path = String::formatted("{}/Userland/Libraries/LibJS/Tests/test-common.js", serenity_source_dir);
|
||||
common_path = DeprecatedString::formatted("{}/Userland/Libraries/LibJS/Tests/test-common.js", serenity_source_dir);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue