aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2020-11-29 16:17:28 +0100
committerjohannst <johannes.stoelp@gmail.com>2020-11-29 16:17:28 +0100
commit6b6c7ca4f4cce33595b4187f23d4003aecef47f6 (patch)
tree2b0f790fd3577c63ffaa7a19ac14bdff8ff22610 /test
parentd103cc99e36e0579c3891f6f8e9666bf9fa0f44d (diff)
downloaddynld-6b6c7ca4f4cce33595b4187f23d4003aecef47f6.tar.gz
dynld-6b6c7ca4f4cce33595b4187f23d4003aecef47f6.zip
rename fmt & print functions
Diffstat (limited to 'test')
-rw-r--r--test/checker.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/checker.cc b/test/checker.cc
index 2b5bc8a..2a06666 100644
--- a/test/checker.cc
+++ b/test/checker.cc
@@ -7,7 +7,7 @@
void check_dec() {
char have[16];
- int len = dynld_snprintf(have, sizeof(have), "%d %d", 12345, -54321);
+ int len = fmt(have, sizeof(have), "%d %d", 12345, -54321);
ASSERT_EQ("12345 -54321", have);
ASSERT_EQ(12, len);
@@ -16,7 +16,7 @@ void check_dec() {
void check_hex() {
char have[16];
- int len = dynld_snprintf(have, sizeof(have), "%x %x", 0xdeadbeef, 0xcafe);
+ int len = fmt(have, sizeof(have), "%x %x", 0xdeadbeef, 0xcafe);
ASSERT_EQ("deadbeef cafe", have);
ASSERT_EQ(13, len);
@@ -25,7 +25,7 @@ void check_hex() {
void check_ptr() {
char have[16];
- int len = dynld_snprintf(have, sizeof(have), "%p %p", (void*)0xabcd, (void*)0x0);
+ int len = fmt(have, sizeof(have), "%p %p", (void*)0xabcd, (void*)0x0);
ASSERT_EQ("0xabcd 0x0", have);
ASSERT_EQ(10, len);
@@ -33,14 +33,14 @@ void check_ptr() {
}
void check_null() {
- int len = dynld_snprintf(0, 0, "%s", "abcd1234efgh5678");
+ int len = fmt(0, 0, "%s", "abcd1234efgh5678");
ASSERT_EQ(16, len);
}
void check_exact_len() {
char have[8];
- int len = dynld_snprintf(have, sizeof(have), "%s", "12345678");
+ int len = fmt(have, sizeof(have), "%s", "12345678");
ASSERT_EQ("1234567", have);
ASSERT_EQ(8, len);
@@ -49,7 +49,7 @@ void check_exact_len() {
void check_exceed_len() {
char have[8];
- int len = dynld_snprintf(have, sizeof(have), "%s", "123456789abcedf");
+ int len = fmt(have, sizeof(have), "%s", "123456789abcedf");
ASSERT_EQ("1234567", have);
ASSERT_EQ(15, len);