Config.h 1009 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef UNITTEST_CONFIG_H
  2. #define UNITTEST_CONFIG_H
  3. // Standard defines documented here: http://predef.sourceforge.net
  4. #if defined(_MSC_VER)
  5. # pragma warning(disable:4127) // conditional expression is constant
  6. # pragma warning(disable:4702) // unreachable code
  7. # pragma warning(disable:4722) // destructor never returns, potential memory leak
  8. # if (_MSC_VER == 1200) // VC6
  9. # pragma warning(disable:4786)
  10. # pragma warning(disable:4290)
  11. # endif
  12. #endif
  13. #if defined(unix) \
  14. || defined(__unix__) \
  15. || defined(__unix) \
  16. || defined(linux) \
  17. || defined(__APPLE__) \
  18. || defined(__NetBSD__) \
  19. || defined(__OpenBSD__) \
  20. || defined(__FreeBSD__) \
  21. || defined(__native_client__)
  22. # define UNITTEST_POSIX
  23. #endif
  24. #if defined(__MINGW32__)
  25. # define UNITTEST_MINGW
  26. #endif
  27. // by default, MemoryOutStream is implemented in terms of std::ostringstream, which can be expensive.
  28. // uncomment this line to use the custom MemoryOutStream (no deps on std::ostringstream).
  29. //#define UNITTEST_USE_CUSTOM_STREAMS
  30. #endif