summaryrefslogtreecommitdiff
path: root/tests/core/string
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-08-04 15:55:45 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-08-04 22:03:44 +0200
commit62423b691eff1da8a93a76e1149a1ba1e3ed46b1 (patch)
tree2c6b09ccdc5544237595c78f22389e63b1c90800 /tests/core/string
parentdaa1220a8605be05a2d0cd1c2def71238fcb15ac (diff)
Tests: Silence some intentional errors
Also fix printing messages in ClassDB test.
Diffstat (limited to 'tests/core/string')
-rw-r--r--tests/core/string/test_string.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h
index b8b766023a..8914dbfd9a 100644
--- a/tests/core/string/test_string.h
+++ b/tests/core/string/test_string.h
@@ -697,7 +697,9 @@ TEST_CASE("[String] sprintf") {
format = "fish %-05d frog";
args.clear();
args.push_back(-5);
+ ERR_PRINT_OFF; // Silence warning about 0 ignored.
output = format.sprintf(args, &error);
+ ERR_PRINT_ON;
REQUIRE(error == false);
CHECK(output == String("fish -5 frog"));
@@ -795,7 +797,9 @@ TEST_CASE("[String] sprintf") {
format = "fish %-011f frog";
args.clear();
args.push_back(-99.99);
+ ERR_PRINT_OFF; // Silence warning about 0 ignored.
output = format.sprintf(args, &error);
+ ERR_PRINT_ON;
REQUIRE(error == false);
CHECK(output == String("fish -99.990000 frog"));