views:

419

answers:

5

Programming is learned by writing programs. But code reading is said to be another good way of learning. I would like to improve my unit-testing skills by reading, examining real-world code. Could you recommend any open source projects where the source is extensively tested with unit tests?

I'm interested in code written in C++.

Thanks in advance.

+7  A: 

AFAIK C++ Boost libraries - http://boost.org/ - have broadly covered code base, and a policy that every new piece of code must have unit tests with it. Might be worth checking.

phjr
+1  A: 

I wouldn't call it extensively, but wxWidgets does some UnitTest with CppUnit.

BugSlayer
+1  A: 

The Bazaar version control system is obsessive about automated testing. Unit testing, feature testing, integration testing, blackbox testing, test doubles testing, testing framework testing, parameterized test suites, platform-specific tests, etc.

This has all sorts of nice consequences for the project, but I must refrain here from undue VCS fanboying.

EDIT: oops, I did not notice you said you were interested in C++. Bazaar is a Python project.

ddaa
+4  A: 

The Chromium project.

Bernard
+1  A: 

The trucov project is an open source tool used to verify unit test coverage. The tool itself is extensively unit tested using google's test framework.

Disclaimer: though I did not write the project myself I did mentor the students who did.

caspin