1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:57:35 +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:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -9,12 +9,12 @@
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/Format.h>
#include <AK/JsonObject.h>
#include <AK/JsonValue.h>
#include <AK/LexicalPath.h>
#include <AK/QuickSort.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibTest/Results.h>
#include <LibTest/TestRunnerUtil.h>
@ -28,7 +28,7 @@ public:
return s_the;
}
TestRunner(String test_root, bool print_times, bool print_progress, bool print_json, bool detailed_json = false)
TestRunner(DeprecatedString test_root, bool print_times, bool print_progress, bool print_json, bool detailed_json = false)
: m_test_root(move(test_root))
, m_print_times(print_times)
, m_print_progress(print_progress)
@ -41,7 +41,7 @@ public:
virtual ~TestRunner() { s_the = nullptr; };
virtual void run(String test_glob);
virtual void run(DeprecatedString test_glob);
Test::Counts const& counts() const { return m_counts; }
@ -63,11 +63,11 @@ protected:
void print_test_results() const;
void print_test_results_as_json() const;
virtual Vector<String> get_test_paths() const = 0;
virtual void do_run_single_test(String const&, size_t current_test_index, size_t num_tests) = 0;
virtual Vector<String> const* get_failed_test_names() const { return nullptr; }
virtual Vector<DeprecatedString> get_test_paths() const = 0;
virtual void do_run_single_test(DeprecatedString const&, size_t current_test_index, size_t num_tests) = 0;
virtual Vector<DeprecatedString> const* get_failed_test_names() const { return nullptr; }
String m_test_root;
DeprecatedString m_test_root;
bool m_print_times;
bool m_print_progress;
bool m_print_json;
@ -91,7 +91,7 @@ inline void cleanup()
exit(1);
}
inline void TestRunner::run(String test_glob)
inline void TestRunner::run(DeprecatedString test_glob)
{
size_t progress_counter = 0;
auto test_paths = get_test_paths();
@ -234,11 +234,11 @@ inline void TestRunner::print_test_results_as_json() const
auto name = suite.name;
if (name == "__$$TOP_LEVEL$$__"sv)
name = String::empty();
name = DeprecatedString::empty();
auto path = LexicalPath::relative_path(suite.path, m_test_root);
tests.set(String::formatted("{}/{}::{}", path, name, case_.name), result_name);
tests.set(DeprecatedString::formatted("{}/{}::{}", path, name, case_.name), result_name);
}
}