summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-12-09 16:49:16 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-12-09 16:49:16 +0000
commit8902336d16b98ba4270a12c79a6fb00b1ee1006a (patch)
tree58dc3c9626ee61a93e67ded70fa5525379153e73
parentTidy tests (diff)
downloadlibadhocutil-8902336d16b98ba4270a12c79a6fb00b1ee1006a.tar.bz2
libadhocutil-8902336d16b98ba4270a12c79a6fb00b1ee1006a.tar.xz
libadhocutil-8902336d16b98ba4270a12c79a6fb00b1ee1006a.zip
Test a formatter can be typedef'ed
-rw-r--r--libadhocutil/unittests/testCompileTimeFormatter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libadhocutil/unittests/testCompileTimeFormatter.cpp b/libadhocutil/unittests/testCompileTimeFormatter.cpp
index d1afb68..2c5bedf 100644
--- a/libadhocutil/unittests/testCompileTimeFormatter.cpp
+++ b/libadhocutil/unittests/testCompileTimeFormatter.cpp
@@ -142,6 +142,13 @@ BOOST_AUTO_TEST_CASE ( customBracketted )
BOOST_REQUIRE_EQUAL(this->str(), "custom -( expr )-");
}
+typedef Formatter<formatStringCustom> TestFormat;
+BOOST_AUTO_TEST_CASE ( typedefFormat )
+{
+ TestFormat::write(*this, "expr");
+ BOOST_REQUIRE_EQUAL(this->str(), "custom -( expr )-");
+}
+
extern constexpr const char * formatStringLong = " ";
BOOST_AUTO_TEST_CASE ( longFormatString )
{