From Nightfox@DIGDIST to All on Thu May 24 12:44:13 2018
A while ago, I heard that one method that some people were using to unit test a class was to use this to be able to access private members of a class:
#define private public
That way, you could perform a test and access the private members of a class to ensure the test results are what was expected. When I heard about that, I thought it was clever, but seemed wrong to do that. And some would argue that you probably wouldn't need to directly verify the private members of a class instance..
Also, I remember hearing that in a more recent version of C++ (C++11? C++14?), using #define to re-define language keywords is now considered an error, so it is no longer allowed in the language..
þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
Tue Sep 26 20:55:28 2023
Tue Sep 26 20:05:14 2023
Beech Island Sc
Tue Sep 26 20:02:10 2023
Wed Sep 27 06:16:39 2023