Using a friend class vs. adding accessors for unit testing in C++?
Is it better to add functions that return the internal state of an object for unit testing, as opposed to making the testing class a friend? - especially, when there is no use for the functions except for the case of unit testing. ...