In-source preparation of release.
[libsex.git] / tests / TestUtility.hxx
blob8b097d49336c1d24cb81ca3b33d24c17e7ae67af
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();
22 public:
23 void setUp();
24 void tearDown();
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();
38 void assertBoundary(
39 const char* const buffer,
40 size_t boundary,
41 size_t length);
44 #endif