diff --git a/CppUnitLite/Test.h b/CppUnitLite/Test.h index ff1f1b692..23d1e2573 100644 --- a/CppUnitLite/Test.h +++ b/CppUnitLite/Test.h @@ -68,6 +68,12 @@ protected: testGroup##testName##Instance; \ void testGroup##testName##Test::run (TestResult& result_) +/** + * Declare friend in a class to test its private methods + */ +#define FRIEND_TEST(testGroup, testName) \ + friend class testGroup##testName##Test; + /** * For debugging only: use TEST_UNSAFE to allow debuggers to have access to exceptions, as this * will not wrap execution with a try/catch block