Restructured test directories.
[libsex.git] / tests / src / TestUtility.hxx
blobf8c5ef1389739856110ebccd88c59b3547abe633
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 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();
35 void assertBoundary(
36 const char* const buffer,
37 size_t boundary,
38 size_t length);
41 #endif