bstream.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: tests/streams/bstream.cpp
  3. // Purpose: House the base stream test suite.
  4. // Author: Hans Van Leemputten
  5. // Copyright: (c) 2004 Hans Van Leemputten
  6. // Licence: wxWindows licence
  7. ///////////////////////////////////////////////////////////////////////////////
  8. // For compilers that support precompilation, includes "wx/wx.h".
  9. // and "wx/cppunit.h"
  10. #include "testprec.h"
  11. #ifdef __BORLANDC__
  12. #pragma hdrstop
  13. #endif
  14. // for all others, include the necessary headers
  15. #ifndef WX_PRECOMP
  16. #include "wx/wx.h"
  17. #endif
  18. #include "bstream.h"
  19. using CppUnit::TestSuite;
  20. using CppUnit::Test;
  21. ///////////////////////////////////////////////////////////////////////////////
  22. // Streams main test suite, it houses all stream test suites.
  23. //
  24. class StreamCase : public TestSuite
  25. {
  26. public:
  27. StreamCase()
  28. :TestSuite(STREAM_TEST_NAME)
  29. { /* Nothing extra */ }
  30. static Test *suite();
  31. };
  32. Test *StreamCase::suite()
  33. {
  34. TestSuite *suite = new StreamCase;
  35. /*
  36. * Register all sub stream test suites.
  37. */
  38. STREAM_REGISTER_SUB_SUITE(memStream);
  39. STREAM_REGISTER_SUB_SUITE(strStream);
  40. STREAM_REGISTER_SUB_SUITE(fileStream);
  41. STREAM_REGISTER_SUB_SUITE(ffileStream);
  42. STREAM_REGISTER_SUB_SUITE(tempStream);
  43. STREAM_REGISTER_SUB_SUITE(zlibStream);
  44. STREAM_REGISTER_SUB_SUITE(backStream);
  45. STREAM_REGISTER_SUB_SUITE(socketStream);
  46. extern CppUnit::Test* GetlargeFileSuite();
  47. Test *lfs = GetlargeFileSuite();
  48. if (lfs)
  49. suite->addTest(lfs);
  50. /*
  51. ** Add more stream subtests here
  52. */
  53. return suite;
  54. }
  55. // register in the unnamed registry so that these tests are run by default
  56. CPPUNIT_TEST_SUITE_REGISTRATION(StreamCase);
  57. // also include in its own registry so that these tests can be run alone
  58. CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(StreamCase, STREAM_TEST_NAME);