1 #ifndef TESTUTILITY_HXX
2 #define TESTUTILITY_HXX
4 #include <cppunit/extensions/HelperMacros.h>
6 class TestUtility
: public CppUnit::TestFixture
8 CPPUNIT_TEST_SUITE(TestUtility
);
9 CPPUNIT_TEST(testShortTemplateWithoutFormatting
);
10 CPPUNIT_TEST(testWhetherFalseIsReturnedWhenHeaderFillsBuffer
);
11 CPPUNIT_TEST(testWhetherTrueIsReturnedOnExactFit
);
12 CPPUNIT_TEST(testWhetherUnformattedOverflowsArePrevented
);
13 CPPUNIT_TEST(testWhetherSimpleFormattingWorks
);
14 CPPUNIT_TEST(testWhetherFormattedOverflowsArePreventedBeforeFormatstring
);
15 CPPUNIT_TEST(testWhetherFormattedOverflowsArePreventedInFormatstring
);
16 CPPUNIT_TEST(testMultipleFormatParameters
);
17 CPPUNIT_TEST(testWhetherMultipleParametersDontOverflowBeforeFormatstring
);
18 CPPUNIT_TEST(testWhetherMultipleParametersDontOverflowInFormatstring
);
19 CPPUNIT_TEST(testTemplateFactory
);
20 CPPUNIT_TEST_SUITE_END();
23 void testShortTemplateWithoutFormatting();
24 void testWhetherFalseIsReturnedWhenHeaderFillsBuffer();
25 void testWhetherTrueIsReturnedOnExactFit();
26 void testWhetherUnformattedOverflowsArePrevented();
27 void testWhetherSimpleFormattingWorks();
28 void testWhetherFormattedOverflowsArePreventedBeforeFormatstring();
29 void testWhetherFormattedOverflowsArePreventedInFormatstring();
30 void testMultipleFormatParameters();
31 void testWhetherMultipleParametersDontOverflowBeforeFormatstring();
32 void testWhetherMultipleParametersDontOverflowInFormatstring();
33 void testTemplateFactory();
36 const char* const buffer
,