Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which unit testing framework to use for C development on Windows? [closed]

On Windows XP, using TDM's GCC/MinGW32 for basic development i.e. gcc 4.4.x with gdb. Which unit testing framework to use for test driven development?

Apparently Check's unit tests don't yet work on Windows.

The questions at Unit Testing Frameworks for C and Unit Testing C Code are similar but not specifically about using gcc 4.4.x on Windows.

like image 446
Rob Kam Avatar asked Nov 18 '09 16:11

Rob Kam


People also ask

What can be used for unit testing in C?

The most scalable way to write unit tests in C is using a unit testing framework, such as: CppUTest. Unity. Google Test.

Does C have unit testing?

A Unit Testing Framework for CCUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces.

Which is better xUnit or NUnit?

MSTest is concerned, the biggest difference between xUnit and the other two test frameworks (NUnit and MSTest) is that xUnit is much more extensible when compared to NUnit and MSTest. The [Fact] attribute is used instead of the [Test] attribute.

What are the frameworks to write unit test cases in C#?

Popular C# unit testing frameworks NUnit. XUnit. Built-in Visual Studio testing tools.


3 Answers

Awesome slides from a talk on TDD with C, using nothing but C99 standard stuff.

Personally I like the stuff in glib, which you may be able to use in MinGW.

like image 119
mlibby Avatar answered Sep 19 '22 05:09

mlibby


minunit only is four macros long, so it'll compile on any platform. It's not fully-featured, but does the job, and can be easily extended to fit your needs.

like image 26
philant Avatar answered Sep 18 '22 05:09

philant


Cut is the only C unit testing framework I know that can run on Windows. Check does work on Windows via Cygwin (that's what I am currently using).

like image 20
joemoe Avatar answered Sep 19 '22 05:09

joemoe