summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-11-06 21:45:36 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-08-16 11:15:19 +0200
commit943a3267cbf1160a20f1ea4b3faf3f6227725d9c (patch)
tree9a48d269a9fad01d8d7f7c69fe09754e986e7c3a
parent475de9ce84ff56b93e2b2de2500dc77fe08d83bb (diff)
unotest: backport CPPUNIT_TEST_FIXTURE macro from cppunit.git
Added upstream as <https://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=48145587c4c2dc4f1e07d83073e136336c81ce79>. Reviewed-on: https://gerrit.libreoffice.org/62975 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 20f84aa139e122733f215fc539dcbcdcfce18c81) Change-Id: If3adbad3187e3d2b4319be7b295b41d5b7e9c08d
-rw-r--r--include/unotest/bootstrapfixturebase.hxx15
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