Learning unittesting in C++ Builder

Today I looked into unittesting with C++ Builder. The buildin DUnit framework is useful. It incorporates about 12 functions to test your code. I only used the ‘CheckEquals’ function for now.

Going to look into testing a bit more tomorrow. I want to develop Weather Station 2 using the Test Driven Development (TDD) method. This means I first write the tests and later add the code for the methods. At first all tests will fail. But when my code is added they will succeed. So you get tested blocks of code. In that way I minimize the bugs that could exist in the code.

Scroll to Top