mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:37:35 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Format.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/JsonValue.h>
|
||||
|
@ -29,7 +29,7 @@ public:
|
|||
return s_the;
|
||||
}
|
||||
|
||||
TestRunner(DeprecatedString test_root, bool print_times, bool print_progress, bool print_json, bool detailed_json = false)
|
||||
TestRunner(ByteString 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)
|
||||
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
virtual ~TestRunner() { s_the = nullptr; }
|
||||
|
||||
virtual void run(DeprecatedString test_glob);
|
||||
virtual void run(ByteString test_glob);
|
||||
|
||||
Test::Counts const& counts() const { return m_counts; }
|
||||
|
||||
|
@ -64,11 +64,11 @@ protected:
|
|||
void print_test_results() const;
|
||||
void print_test_results_as_json() const;
|
||||
|
||||
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; }
|
||||
virtual Vector<ByteString> get_test_paths() const = 0;
|
||||
virtual void do_run_single_test(ByteString const&, size_t current_test_index, size_t num_tests) = 0;
|
||||
virtual Vector<ByteString> const* get_failed_test_names() const { return nullptr; }
|
||||
|
||||
DeprecatedString m_test_root;
|
||||
ByteString m_test_root;
|
||||
bool m_print_times;
|
||||
bool m_print_progress;
|
||||
bool m_print_json;
|
||||
|
@ -92,7 +92,7 @@ inline void cleanup()
|
|||
exit(1);
|
||||
}
|
||||
|
||||
inline void TestRunner::run(DeprecatedString test_glob)
|
||||
inline void TestRunner::run(ByteString test_glob)
|
||||
{
|
||||
size_t progress_counter = 0;
|
||||
auto test_paths = get_test_paths();
|
||||
|
@ -243,11 +243,11 @@ inline void TestRunner::print_test_results_as_json() const
|
|||
|
||||
auto name = suite.name;
|
||||
if (name == "__$$TOP_LEVEL$$__"sv)
|
||||
name = DeprecatedString::empty();
|
||||
name = ByteString::empty();
|
||||
|
||||
auto path = LexicalPath::relative_path(suite.path, m_test_root);
|
||||
|
||||
tests.set(DeprecatedString::formatted("{}/{}::{}", path, name, case_.name), result_name);
|
||||
tests.set(ByteString::formatted("{}/{}::{}", path, name, case_.name), result_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +274,7 @@ inline void TestRunner::print_test_results_as_json() const
|
|||
root.set("files_total", m_counts.files_total);
|
||||
root.set("duration", m_total_elapsed_time_in_ms / 1000.0);
|
||||
}
|
||||
outln("{}", root.to_deprecated_string());
|
||||
outln("{}", root.to_byte_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue