]> git.saurik.com Git - wxWidgets.git/blob - tests/streams/bstream.cpp
Patch 1053127 - Test fixes.
[wxWidgets.git] / tests / streams / bstream.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/streams/bstream.cpp
3 // Purpose: House the base stream test suite.
4 // Author: Hans Van Leemputten
5 // RCS-ID: $Id$
6 // Copyright: (c) 2004 Hans Van Leemputten
7 // Licence: wxWidgets licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #if defined(__GNUG__) && !defined(__APPLE__)
11 #pragma implementation
12 #pragma interface
13 #endif
14
15 // For compilers that support precompilation, includes "wx/wx.h".
16 #include "wx/wxprec.h"
17
18 #ifdef __BORLANDC__
19 #pragma hdrstop
20 #endif
21
22 // for all others, include the necessary headers
23 #ifndef WX_PRECOMP
24 #include "wx/wx.h"
25 #endif
26
27 #include "wx/cppunit.h"
28 #include "bstream.h"
29
30 using CppUnit::TestSuite;
31 using CppUnit::Test;
32
33 ///////////////////////////////////////////////////////////////////////////////
34 // Streams main test suite, it houses all stream test suites.
35 //
36
37 class StreamCase : public TestSuite
38 {
39 public:
40 StreamCase()
41 :TestSuite(STREAM_TEST_NAME)
42 { /* Nothing extra */ }
43 static Test *suite();
44 };
45
46 Test *StreamCase::suite()
47 {
48 TestSuite *suite = new StreamCase;
49
50 /*
51 * Register all sub stream test suites.
52 */
53
54 STREAM_REGISTER_SUB_SUITE(memStream);
55 STREAM_REGISTER_SUB_SUITE(strStream);
56 STREAM_REGISTER_SUB_SUITE(fileStream);
57 STREAM_REGISTER_SUB_SUITE(ffileStream);
58 STREAM_REGISTER_SUB_SUITE(zlibStream);
59
60 /*
61 ** Add more stream subtests here
62 */
63
64 return suite;
65 }
66
67 // register in the unnamed registry so that these tests are run by default
68 CPPUNIT_TEST_SUITE_REGISTRATION(StreamCase);
69 // also include in it's own registry so that these tests can be run alone
70 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(StreamCase, STREAM_TEST_NAME);
71