diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-11-06 21:45:36 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-11-07 13:13:15 +0100 |
commit | 20f84aa139e122733f215fc539dcbcdcfce18c81 (patch) | |
tree | f3c27350004aff6b1254b450b6cf7105cc1e9d4c /include/unotest | |
parent | 577d4f115fd607d36ad574872f187b7c08223ace (diff) |
unotest: backport CPPUNIT_TEST_FIXTURE macro from cppunit.git
Added upstream as
<https://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=48145587c4c2dc4f1e07d83073e136336c81ce79>.
Change-Id: If3adbad3187e3d2b4319be7b295b41d5b7e9c08d
Reviewed-on: https://gerrit.libreoffice.org/62975
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'include/unotest')
-rw-r--r-- | include/unotest/bootstrapfixturebase.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/unotest/bootstrapfixturebase.hxx b/include/unotest/bootstrapfixturebase.hxx index 67be3b5f4ea7..0a967d34d736 100644 --- a/include/unotest/bootstrapfixturebase.hxx +++ b/include/unotest/bootstrapfixturebase.hxx @@ -22,6 +22,21 @@ #include <unotest/detail/unotestdllapi.hxx> #include <unotest/directories.hxx> +// For cppunit < 1.15.0. +#ifndef CPPUNIT_TEST_FIXTURE +#define CPPUNIT_TEST_FIXTURE(TestClass, TestName) \ + class TestName : public TestClass \ + { \ + public: \ + void TestBody(); \ + CPPUNIT_TEST_SUITE(TestName); \ + CPPUNIT_TEST(TestBody); \ + CPPUNIT_TEST_SUITE_END(); \ + }; \ + CPPUNIT_TEST_SUITE_REGISTRATION(TestName); \ + void TestName::TestBody() +#endif + namespace test { // Class to do lots of heavy-lifting UNO & environment |