From 8902336d16b98ba4270a12c79a6fb00b1ee1006a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 9 Dec 2016 16:49:16 +0000 Subject: Test a formatter can be typedef'ed --- libadhocutil/unittests/testCompileTimeFormatter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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 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 ) { -- cgit v1.2.3