?login_element?

Subversion Repositories NedoOS

Rev

Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download

  1. #ifndef UNITTEST_CONFIG_H
  2. #define UNITTEST_CONFIG_H
  3.  
  4. // Standard defines documented here: http://predef.sourceforge.net
  5.  
  6. #if defined(_MSC_VER)
  7.    #pragma warning(disable:4702)// unreachable code
  8.    #pragma warning(disable:4722)// destructor never returns, potential memory leak
  9.  
  10.    #if (_MSC_VER == 1200)  // VC6
  11.       #define UNITTEST_COMPILER_IS_MSVC6
  12.       #pragma warning(disable:4786)
  13.       #pragma warning(disable:4290)
  14.    #endif
  15.  
  16.    #ifdef _USRDLL
  17.       #define UNITTEST_WIN32_DLL
  18.    #endif
  19.  
  20.    #define UNITTEST_WIN32
  21. #endif
  22.  
  23. #if defined(unix) || defined(__unix__) || defined(__unix) || defined(linux) || \
  24.    defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) \
  25.    || defined (__HAIKU__) || defined(_AIX)
  26.    #define UNITTEST_POSIX
  27. #endif
  28.  
  29. #if defined(__MINGW32__)
  30.    #define UNITTEST_MINGW
  31. #endif
  32.  
  33.  
  34. // By default, MemoryOutStream is implemented in terms of std::ostringstream.
  35. // This is useful if you are using the CHECK macros on objects that have something like this defined:
  36. // std::ostringstream& operator<<(std::ostringstream& s, const YourObject& value)
  37. //
  38. // On the other hand, it can be more expensive.
  39. // Un-comment this line to use the custom MemoryOutStream (no deps on std::ostringstream).
  40.  
  41. // #define UNITTEST_USE_CUSTOM_STREAMS
  42.  
  43. // Developer note: This dual-macro setup is to preserve compatibility with UnitTest++ 1.4 users
  44. // who may have used or defined UNITTEST_USE_CUSTOM_STREAMS outside of this configuration file, as
  45. // well as Google Code HEAD users that may have used or defined
  46. // UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM outside of this configuration file.
  47. #ifndef UNITTEST_USE_CUSTOM_STREAMS
  48.    #define UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM
  49. #endif
  50.  
  51. // DeferredTestReporter uses the STL to collect test results for subsequent export by reporters like
  52. // XmlTestReporter.  If you don't want to use this functionality, uncomment this line and no STL
  53. // headers or code will be compiled into UnitTest++
  54.  
  55. //#define UNITTEST_NO_DEFERRED_REPORTER
  56.  
  57.  
  58. // By default, asserts that you report via UnitTest::ReportAssert() abort the current test and
  59. // continue to the next one by throwing an exception, which unwinds the stack naturally, destroying
  60. // all auto variables on its way back down.  If you don't want to (or can't) use exceptions for your
  61. // platform/compiler, uncomment this line.  All exception code will be removed from UnitTest++,
  62. // assert recovery will be done via setjmp/longjmp, and NO correct stack unwinding will happen!
  63.  
  64. //#define UNITTEST_NO_EXCEPTIONS
  65.  
  66.  
  67. // std namespace qualification: used for functions like strcpy that
  68. // may live in std:: namespace (cstring header).
  69. #if defined( UNITTEST_COMPILER_IS_MSVC6 )
  70.    #define UNIITEST_NS_QUAL_STD(x) x
  71. #else
  72.    #define UNIITEST_NS_QUAL_STD(x) ::std::x
  73. #endif
  74.  
  75. // By default, UnitTest++ will attempt to define "short" macro names like CHECK and  CHECK_EQUAL
  76. // for "public" interface macros etc. Defining UNITTEST_DISABLE_SHORT_MACROS in your project
  77. // will disable this behavior, leaving only the longer macros "namespaced" with the UNITTEST_
  78. // prefix.
  79. //
  80. // "Internal" utility macros will only have the UNITTEST_IMPL_ prefix.
  81.  
  82. // #define UNITTEST_DISABLE_SHORT_MACROS
  83.  
  84. #endif
  85.