friend-class

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. ...

Inheriting friendship in C++?

Since class friendship is not inherited in C++, what's the best way to "fake" it? I was thinking about exposing the friend class's private interface through protected methods in the to-be-inherited base-class, but that results in having to write (and maintain) the same interface twice. Are there any other ways? ...