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(testChainedTemplateFactory
);
21 CPPUNIT_TEST_SUITE_END();
24 void testShortTemplateWithoutFormatting();
25 void testWhetherFalseIsReturnedWhenHeaderFillsBuffer();
26 void testWhetherTrueIsReturnedOnExactFit();
27 void testWhetherUnformattedOverflowsArePrevented();
28 void testWhetherSimpleFormattingWorks();
29 void testWhetherFormattedOverflowsArePreventedBeforeFormatstring();
30 void testWhetherFormattedOverflowsArePreventedInFormatstring();
31 void testMultipleFormatParameters();
32 void testWhetherMultipleParametersDontOverflowBeforeFormatstring();
33 void testWhetherMultipleParametersDontOverflowInFormatstring();
35 void testTemplateFactory();
36 void testChainedTemplateFactory();
39 const char* const buffer
,