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