convenient macro declaring friend for unittest classes to test private methods
							parent
							
								
									40659cab38
								
							
						
					
					
						commit
						09ffc73b6e
					
				|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue