diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-01-12 20:23:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-01-12 20:23:55 +0300 |
commit | 7a8cd0bf0605433cd2d48370ddb8e4c9f3c1d70b (patch) | |
tree | 8147bee7b7de65a9b7ced08fe02480351c9eaff8 | |
parent | f8b160e677da0135fe03bc24586452f0832e0477 (diff) | |
download | mv-7a8cd0bf0605433cd2d48370ddb8e4c9f3c1d70b.tar.gz mv-7a8cd0bf0605433cd2d48370ddb8e4c9f3c1d70b.tar.bz2 mv-7a8cd0bf0605433cd2d48370ddb8e4c9f3c1d70b.tar.xz mv-7a8cd0bf0605433cd2d48370ddb8e4c9f3c1d70b.zip |
Add test for strprintf.
-rw-r--r-- | src/utils/stringutils_unittest.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc index 9860d90c7..a866e68b6 100644 --- a/src/utils/stringutils_unittest.cc +++ b/src/utils/stringutils_unittest.cc @@ -132,6 +132,24 @@ TEST_CASE("stringuntils toString 1") REQUIRE(strprintf("%d", 123) == toString(CAST_U8(123))); } +TEST_CASE("stringuntils strprintf 1") +{ + REQUIRE(strprintf("%s very long string. 123456789012345678901234567890" + "+++++++++++++++++++++++++++++++++++++++" + "________________________________" + "***********************************" + "----------------------------------------" + "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| %s", + "test", "end of test") == + "test very long string. 123456789012345678901234567890" + "+++++++++++++++++++++++++++++++++++++++" + "________________________________" + "***********************************" + "----------------------------------------" + "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| " + "end of test"); +} + TEST_CASE("stringuntils toString 2") { for (int f = 0; f < 10000000; f += 123) |