diff options
author | Linus Groh <mail@linusgroh.de> | 2023-01-26 18:58:09 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-27 20:38:49 +0000 |
commit | 6e7459322d8336bfe52e390ab4a1b2e82e24c05e (patch) | |
tree | 6da4b3a89764a22a1c62eabfa5fc5ee954519c41 /Tests/LibC | |
parent | da81041e97d0fc7d37a985ce6ca4ded19ce2cdd1 (diff) | |
download | serenity-6e7459322d8336bfe52e390ab4a1b2e82e24c05e.zip |
AK: Remove StringBuilder::build() in favor of to_deprecated_string()
Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
Diffstat (limited to 'Tests/LibC')
-rw-r--r-- | Tests/LibC/TestRealpath.cpp | 4 | ||||
-rw-r--r-- | Tests/LibC/TestSnprintf.cpp | 2 | ||||
-rw-r--r-- | Tests/LibC/TestStrlcpy.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Tests/LibC/TestRealpath.cpp b/Tests/LibC/TestRealpath.cpp index 1bb34eaa0a..86c259f66b 100644 --- a/Tests/LibC/TestRealpath.cpp +++ b/Tests/LibC/TestRealpath.cpp @@ -50,7 +50,7 @@ TEST_CASE(overlong_realpath) expected.append({ tmp_dir, strlen(tmp_dir) }); // But first, demonstrate the functionality at a reasonable depth: - auto expected_str = expected.build(); + auto expected_str = expected.to_deprecated_string(); check_result("getwd", expected_str, getwd(static_cast<char*>(calloc(1, PATH_MAX)))); check_result("getcwd", expected_str, getcwd(nullptr, 0)); check_result("realpath", expected_str, realpath(".", nullptr)); @@ -74,7 +74,7 @@ TEST_CASE(overlong_realpath) outln("cwd should now be ridiculously large"); // Evaluate - expected_str = expected.build(); + expected_str = expected.to_deprecated_string(); check_result("getwd", {}, getwd(static_cast<char*>(calloc(1, PATH_MAX)))); check_result("getcwd", expected_str, getcwd(nullptr, 0)); diff --git a/Tests/LibC/TestSnprintf.cpp b/Tests/LibC/TestSnprintf.cpp index 055a64b37c..c7535db722 100644 --- a/Tests/LibC/TestSnprintf.cpp +++ b/Tests/LibC/TestSnprintf.cpp @@ -43,7 +43,7 @@ static DeprecatedString show(ByteBuffer const& buf) builder.append('_'); } builder.append(')'); - return builder.build(); + return builder.to_deprecated_string(); } template<typename TArg> diff --git a/Tests/LibC/TestStrlcpy.cpp b/Tests/LibC/TestStrlcpy.cpp index c766429a04..01d97e45c0 100644 --- a/Tests/LibC/TestStrlcpy.cpp +++ b/Tests/LibC/TestStrlcpy.cpp @@ -37,7 +37,7 @@ static DeprecatedString show(ByteBuffer const& buf) builder.append('_'); } builder.append(')'); - return builder.build(); + return builder.to_deprecated_string(); } static bool test_single(Testcase const& testcase) |