|
4 | 4 | #include <gtest/gtest.h> |
5 | 5 |
|
6 | 6 | #define CppUnit2Gtest |
7 | | - |
8 | | -#define CPPUNIT_NS ::CppUnit |
| 7 | +#define CppUnit2Gtest_VERSION "0.0.0" |
| 8 | +#define CPPUNIT_VERSION "CppUnit2Gtest" |
| 9 | +#define CPPUNIT_NS ::CppUnit |
| 10 | +#define CPPUNIT_NS_BEGIN namespace CppUnit { |
| 11 | +#define CPPUNIT_NS_END } |
9 | 12 |
|
10 | 13 | namespace CppUnit { |
11 | 14 |
|
@@ -287,21 +290,27 @@ namespace to { namespace gtest { |
287 | 290 | #define CPPUNIT_ASSERT_LESSEQUAL_MESSAGE(msg, expected, actual) CppUnit2Gtest_assertion_wrapper_(LE, (actual, expected) << msg) |
288 | 291 | #define CPPUNIT_ASSERT_GREATEREQUAL_MESSAGE(msg, expected, actual) CppUnit2Gtest_assertion_wrapper_(GE, (actual, expected) << msg) |
289 | 292 |
|
290 | | -#define CppUnit2Gtest_FailCompilation_NotSupported static_assert(false, \ |
291 | | - "This CppUnit macro is not supported. Please rewrite this test in GTest or with normal macros") |
| 293 | +#define CppUnit2Gtest_FailCompilation_NotSupported_ static_assert(false, \ |
| 294 | + "This CppUnit macro is not supported. Please rewrite this test in GTest or with implmented macros") |
292 | 295 |
|
293 | | -// Things like assert failed are intentionally not added |
294 | | -// We can add them but behaviour could be buggy |
295 | | -// (I think an inline lambda counts as a function and therefor ASSERT won't end the function |
296 | | -// early so we'd call the lambda, return to outer function then `ASSERT_TRUE(HasFailure());` (?) |
297 | | -// Alternatively we can add the gtest header for testing extenstions (see internal tests) and use that. |
298 | | -// Neither seem like a good idea |
| 296 | +// Some macros are intentionally not added |
| 297 | +// Most are to allow users to define them themselves if they wish |
| 298 | +// CPPUNIT_TEST_SUITE_PROPERTY |
| 299 | +// Some however should really be re-written |
299 | 300 | // These include: |
300 | | -#define CPPUNIT_TEST_SUITE_ADD_TEST(test) CppUnit2Gtest_FailCompilation_NotSupported |
301 | | - |
302 | | -// Does nothing, these were for exporting plugins (not adding a main). |
| 301 | +#define CPPUNIT_TEST_SUITE_ADD_TEST(t) CppUnit2Gtest_FailCompilation_NotSupported_ |
| 302 | +#define CPPUNIT_ASSERT_ASSERTION_FAIL(t) CppUnit2Gtest_FailCompilation_NotSupported_ |
| 303 | +#define CPPUNIT_EXTRACT_EXCEPTION_TYPE_(t) CppUnit2Gtest_FailCompilation_NotSupported_ |
| 304 | +#define CPPUNIT_ASSERT_ASSERTION_FAIL_MESSAGE(t) CppUnit2Gtest_FailCompilation_NotSupported_ |
| 305 | +#define CppUnit2Gtest_BadCast_ static_assert(false, "This did a C style cast and is unlikely to be what you wanted") |
| 306 | +#define CPPUNIT_STATIC_CAST(a, b) CppUnit2Gtest_BadCast_ |
| 307 | +#define CPPUNIT_CONST_CAST(a,b) CppUnit2Gtest_BadCast_ |
| 308 | + |
| 309 | +// Macros that (now) do nothing have been implemented as such |
| 310 | +// These were for exporting plugins (not adding a main). |
303 | 311 | #define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() |
304 | 312 | #define CPPUNIT_PLUGIN_IMPLEMENT() |
| 313 | +#define CPPUNIT_WRAP_COLUMN 1 |
305 | 314 |
|
306 | 315 | #if defined(Cpp2Unit2Gtest_EnableMainHelperClasses) |
307 | 316 |
|
|
0 commit comments