]> git.saurik.com Git - wxWidgets.git/blob - tests/streams/bstream.cpp
82961cfbd638bf5cb40840d3d08e35389e43eb11
[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 // For compilers that support precompilation, includes "wx/wx.h".
11 // and "wx/cppunit.h"
12 #include "testprec.h"
13
14 #ifdef __BORLANDC__
15 #pragma hdrstop
16 #endif
17
18 // for all others, include the necessary headers
19 #ifndef WX_PRECOMP
20 #include "wx/wx.h"
21 #endif
22
23 #include "bstream.h"
24
25 using CppUnit::TestSuite;
26 using CppUnit::Test;
27
28 ///////////////////////////////////////////////////////////////////////////////
29 // Streams main test suite, it houses all stream test suites.
30 //
31
32 class StreamCase : public TestSuite
33 {
34 public:
35 StreamCase()
36 :TestSuite(STREAM_TEST_NAME)
37 { /* Nothing extra */ }
38 static Test *suite();
39 };
40
41 Test *StreamCase::suite()
42 {
43 TestSuite *suite = new StreamCase;
44
45 /*
46 * Register all sub stream test suites.
47 */
48
49 STREAM_REGISTER_SUB_SUITE(memStream);
50 STREAM_REGISTER_SUB_SUITE(strStream);
51 STREAM_REGISTER_SUB_SUITE(fileStream);
52 STREAM_REGISTER_SUB_SUITE(ffileStream);
53 STREAM_REGISTER_SUB_SUITE(zlibStream);
54
55 extern CppUnit::Test* GetlargeFileSuite();
56 Test *lfs = GetlargeFileSuite();
57 if (lfs)
58 suite->addTest(lfs);
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