1 #ifndef TESTS_UTILITY_HXX
2 #define TESTS_UTILITY_HXX
4 #include <cppunit/extensions/HelperMacros.h>
11 class tests::Utility
: public CppUnit::TestFixture
13 CPPUNIT_TEST_SUITE(Utility
);
14 CPPUNIT_TEST(testShortTemplateWithoutFormatting
);
15 CPPUNIT_TEST(testWhetherFalseIsReturnedWhenHeaderFillsBuffer
);
16 CPPUNIT_TEST(testWhetherTrueIsReturnedOnExactFit
);
17 CPPUNIT_TEST(testWhetherUnformattedOverflowsArePrevented
);
18 CPPUNIT_TEST(testWhetherSimpleFormattingWorks
);
19 CPPUNIT_TEST(testWhetherFormattedOverflowsArePreventedBeforeFormatstring
);
20 CPPUNIT_TEST(testWhetherFormattedOverflowsArePreventedInFormatstring
);
21 CPPUNIT_TEST(testMultipleFormatParameters
);
22 CPPUNIT_TEST(testWhetherMultipleParametersDontOverflowBeforeFormatstring
);
23 CPPUNIT_TEST(testWhetherMultipleParametersDontOverflowInFormatstring
);
24 CPPUNIT_TEST(testTemplateFactory
);
25 CPPUNIT_TEST(testChainedTemplateFactory
);
26 CPPUNIT_TEST_SUITE_END();
29 void testShortTemplateWithoutFormatting();
30 void testWhetherFalseIsReturnedWhenHeaderFillsBuffer();
31 void testWhetherTrueIsReturnedOnExactFit();
32 void testWhetherUnformattedOverflowsArePrevented();
33 void testWhetherSimpleFormattingWorks();
34 void testWhetherFormattedOverflowsArePreventedBeforeFormatstring();
35 void testWhetherFormattedOverflowsArePreventedInFormatstring();
36 void testMultipleFormatParameters();
37 void testWhetherMultipleParametersDontOverflowBeforeFormatstring();
38 void testWhetherMultipleParametersDontOverflowInFormatstring();
40 void testTemplateFactory();
41 void testChainedTemplateFactory();
44 const char* const buffer
,