You are not logged in.

#1 2009-02-11 21:23:26

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Testing private methods in CppUnit

I'm doing a software engineering course in C++ and I'd really like to be able to test my private methods. I know there's a whole debate as to whether private methods should be tested at all, and I have a blog post in the works where i'll spell out my thoughts. Till then I'd just like to know if there's a way to get CppUnit to test private methods (without having my test classes be subclasses and everything be protected).
Thanks


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#2 2009-02-11 22:39:25

kakTuZ
Member
From: Hannover, Germany
Registered: 2007-10-20
Posts: 86

Re: Testing private methods in CppUnit

http://c2.com/cgi/wiki?TestingPrivateMe … eePlusPlus
choose wisely
I would go with a test class defined as a friend.

Offline

Board footer

Powered by FluxBB