Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User defined reporter extending XmlReporter hindered by private members #683

Closed
robfywa opened this issue Jul 14, 2016 · 1 comment
Closed

Comments

@robfywa
Copy link

robfywa commented Jul 14, 2016

An easy way to extend XmlReporter with additional info would be to inherit from the XmlReporter class, allowing use of e.g. its m_xml member. But these members are private rather than protected which makes them unusable from the derived class.

It seems changing them from private to protected would enable easy extension of the reporter classes without any major downsides, since they would still not be publicly exposed.

@philsquared
Copy link
Collaborator

Thanks for the feedback. I'll take a look and consider this.
OTTOMH: one possible downside is that it increases the scope for Fragile Base Class issues. It's possible the benefits outweigh the risks, though (or maybe other changes can be made to keep things more stable - e.g. protected method accessors).

For Catch2 I'm looking at reworking the reporter framework (yes, again, sorry) to make it more composable to start with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants