]>
Commit | Line | Data |
---|---|---|
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 namespace CppUnit; | |
31 | ||
32 | /////////////////////////////////////////////////////////////////////////////// | |
33 | // Streams main test suite, it houses all stream test suites. | |
34 | // | |
35 | ||
36 | class StreamCase : public TestSuite | |
37 | { | |
38 | public: | |
39 | StreamCase() | |
40 | :TestSuite(STREAM_TEST_NAME) | |
41 | { /* Nothing extra */ } | |
42 | static Test *suite(); | |
43 | }; | |
44 | ||
45 | Test *StreamCase::suite() | |
46 | { | |
47 | TestSuite *suite = new StreamCase; | |
48 | ||
49 | /* | |
50 | * Register all sub stream test suites. | |
51 | */ | |
52 | ||
53 | STREAM_REGISTER_SUB_SUITE(memStream); | |
54 | STREAM_REGISTER_SUB_SUITE(strStream); | |
55 | STREAM_REGISTER_SUB_SUITE(fileStream); | |
56 | STREAM_REGISTER_SUB_SUITE(ffileStream); | |
57 | STREAM_REGISTER_SUB_SUITE(zlibStream); | |
58 | ||
59 | /* | |
60 | ** Add more stream subtests here | |
61 | */ | |
62 | ||
63 | return suite; | |
64 | } | |
65 | ||
66 | // register in the unnamed registry so that these tests are run by default | |
67 | CPPUNIT_TEST_SUITE_REGISTRATION(StreamCase); | |
68 | // also include in it's own registry so that these tests can be run alone | |
69 | CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(StreamCase, STREAM_TEST_NAME); | |
70 |