Modified DECLARE/DEFINE to expect seperate scope.
[libsex.git] / tests / Utility.hxx
blob72f7ceff0670708369ea57e45f0483aed0c039e9
1 #ifndef TESTS_UTILITY_HXX
2 #define TESTS_UTILITY_HXX
4 #include <cppunit/extensions/HelperMacros.h>
6 namespace tests
8 class Utility;
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();
28 public:
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();
43 void assertBoundary(
44 const char* const buffer,
45 size_t boundary,
46 size_t length);
49 #endif