Tag: CppUnit
Eclipse CPPUnit Error Parser
I’ve recently been experimenting with using Eclipse CDT as IDE for Swift development. One of the handy things is that Eclipse CDT has support for parsing compiler error messages, allowing you to quickly navigate to the failing source code line by simply clicking on the error message. Although Eclipse CDT supports all the compilers we use for Swift out of the box, I was still missing the easy navigation for fixing failing CPPUnit tests. Since the error parser (just like almost everything else from Eclipse) is extensible, I wrote a small plugin for parsing CPPUnit error messages.
Improving QtTest usability with QtTestUtil
As much as I like CppUnit for writing C++ unit tests, I still prefer using Qt’s built-in QtTest module for Qt-based projects. This avoids a dependency on an external library, lowering the threshold for running and writing unit tests. Unfortunately, QtTest is very basic, and lacks some useful features such as automatic test registration and running multiple test suites in one test binary. In order to improve QtTest’s usability, I started creating some macros and classes that fill in some of the gaps, and bundled them into QtTestUtil.