I have just began a new C project, using gcc (currently 4.5.2). Now, before it grows too big, I want to start unit testing it. After some googling I've realized that there are numerous of frameworks to choose from. I cannot afford testing them all.
Note that I don't mind using g++ for the unit tests, as long as I can use gcc for the project itself. It won't hurt if it has good VIM integration, though not mandatory.
So, simply, which should I choose and why?
The unit test framework for C or C++ popular amongst developers is Embunit. Embunit is an open source unit testing framework which is designed for software application written in C or C++. Embunit is designed as a unit testing tool for both developers and testers for software application written in C or C++.
Commercial/freeware test framework for unit and integration testing that analyses dependencies between test cases to flow data between them. Supports combinatorial testing, multithreading and time-dependencies. Implement unit tests without coding.
You can download the Google Test adapter and Boost.Test Adapter extensions on the Visual Studio Marketplace. Find them at Test adapter for Boost.Test and Test adapter for Google Test. The following sections show the basic steps to get you started with C++ unit testing.
Header-only unit testing framework. Multi-platform. Supports running each test in a separate process. Works without needing to "register" test cases. A robust header only unit testing framework, for C and C++. Supports function mocking, memory leak detection, crash report.
I've played with libcheck, which is pretty good. It's been a while since I last used it, but it does the job, and is just straight C.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With