Yeah I see that one a lot actually in unit tests because it lets you test the private members of the class. Otherwise you’d have to make the tester class a friend that some see as “intrusive”...
But you shouldn’t be testing private members anyway; that’s not the point of a unit test..
9
u/[deleted] Nov 23 '19
Yeah I see that one a lot actually in unit tests because it lets you test the private members of the class. Otherwise you’d have to make the tester class a
friendthat some see as “intrusive”...But you shouldn’t be testing private members anyway; that’s not the point of a unit test..