aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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);