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 f
How about making internal state "protected"? And then do unittest using derived class.