diff options
author | Marco Paland <marco@paland.com> | 2019-01-31 18:00:24 +0100 |
---|---|---|
committer | Marco Paland <marco@paland.com> | 2019-01-31 18:00:24 +0100 |
commit | e9375ed897cd86c72c9140e7ef88c184506d176c (patch) | |
tree | 1b1352431bae8bc8f55d22422042ca11313b4fae | |
parent | 8f302bfc4b23eaa89529a368dc122a98443eece8 (diff) | |
download | printf-e9375ed897cd86c72c9140e7ef88c184506d176c.tar.gz printf-e9375ed897cd86c72c9140e7ef88c184506d176c.tar.bz2 printf-e9375ed897cd86c72c9140e7ef88c184506d176c.zip |
test(test_suite): add more #-flag test cases
-rw-r--r-- | test/test_suite.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_suite.cpp b/test/test_suite.cpp index 2103a5b..e3630d7 100644 --- a/test/test_suite.cpp +++ b/test/test_suite.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////
// \author (c) Marco Paland (info@paland.com)
-// 2017-2018, PALANDesign Hannover, Germany
+// 2017-2019, PALANDesign Hannover, Germany
//
// \license The MIT License (MIT)
//
@@ -354,6 +354,10 @@ TEST_CASE("# flag", "[]" ) { test::sprintf(buffer, "%#.0x", 0);
REQUIRE(!strcmp(buffer, ""));
+ test::sprintf(buffer, "%#.1x", 0);
+ REQUIRE(!strcmp(buffer, "0"));
+ test::sprintf(buffer, "%#.0llx", (long long)0);
+ REQUIRE(!strcmp(buffer, ""));
test::sprintf(buffer, "%#.8x", 0x614e);
REQUIRE(!strcmp(buffer, "0x0000614e"));
test::sprintf(buffer,"%#b", 6);
|