C unit-testing

Open-source C projects categorized as unit-testing

Top 10 C unit-testing Projects

  • Criterion

    A cross-platform C and C++ unit testing framework for the 21st century

  • Project mention: Show HN: RK Test, a Google Test style library written in C99 | news.ycombinator.com | 2023-12-11

    I really like Google Test, but am planning on doing some embedded development in C, where I sometimes find it awkward to test C code using a C++ library.

    Therefore, I wrote a small unit test library closely mimicking Google Test. It consists of two source files, "rktest.c" and "rktest.h", and is about 1k lines of code and written in C99.

    It uses a trick for self registering tests by placing pointers to the unit test functions into a known place in program memory, that I first learned about from https://github.com/christophercrouzet/rexo/ and https://github.com/Snaipe/Criterion/.

  • Muon

    A Micro (1k lines of code) Unit Test Framework for C/C++ (by jasmcaus)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • qtools

    QTools collection of open source tools for embedded systems development on Windows, Linux and MacOS

  • cauldron

    A collection of single-file C libraries. (generic containers, random number generation, argument parsing and other functionalities) (by camel-cdr)

  • c_koans

    C Koans

  • libGimbal

    C17-based extended standard library, cross-language type system, and unit testing framework targeting Sega Dreamcast, Sony PSP and PSVita, Windows, Mac, Linux, Android, iOS, and WebAssembly.

  • Project mention: Object-oriented Programming with ANSI-C [pdf] | news.ycombinator.com | 2023-06-21

    I'm a huge academic fan of what GTk has accomplished (thanks to their GObject type system), and as much as I know the C89 crowd who thinks macros are all evil probably abhor this kind of thing, I think GTk is one of the most epic, impressive, ambitious C codebases in existence. Witness as non-OO C matches, rivals, and quite often beats Qt on equivalent classes/features in plain C... It's even above "just C++ style C," as they have added features like a property and signal system...

    Such a fanboy it inspired my own type system and massive core library, libgimbal, which uses a type system similar to GObject and targets game consoles like the Sega Dreamcast: https://github.com/gyrovorbis/libgimbal

  • libcester

    A robust header-only unit testing framework for C and C++ programming language. Support function mocking, memory leak detection, crash report.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • clove-unit

    Single-Header Unit Testing framework for C (interoperable with C++) with test autodiscovery feature

  • rexo

    Neat single-file cross-platform unit testing framework for C/C++.

  • Project mention: Show HN: RK Test, a Google Test style library written in C99 | news.ycombinator.com | 2023-12-11

    I really like Google Test, but am planning on doing some embedded development in C, where I sometimes find it awkward to test C code using a C++ library.

    Therefore, I wrote a small unit test library closely mimicking Google Test. It consists of two source files, "rktest.c" and "rktest.h", and is about 1k lines of code and written in C99.

    It uses a trick for self registering tests by placing pointers to the unit test functions into a known place in program memory, that I first learned about from https://github.com/christophercrouzet/rexo/ and https://github.com/Snaipe/Criterion/.

  • testdrive

    An expressive single-header unit testing framework for C.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C unit-testing related posts

  • Show HN: RK Test, a Google Test style library written in C99

    3 projects | news.ycombinator.com | 11 Dec 2023
  • Criterion: A cross-platform C/C++ unit testing framework for the 21st century

    1 project | news.ycombinator.com | 21 Jun 2023
  • What is the best Unit testing framework for VS code for C?

    2 projects | /r/cprogramming | 23 Mar 2023
  • Let's implement buffered, formatted output

    1 project | news.ycombinator.com | 12 Feb 2023
  • SIMD-oriented Fast Mersenne Twister in C and non STD library discussion

    1 project | /r/C_Programming | 2 Feb 2023
  • Github repository with "simple" code examples?

    4 projects | /r/C_Programming | 24 Jan 2023
  • C Posix complaint argument parsing in 42 loc, inspired by Duff's device

    2 projects | news.ycombinator.com | 4 Jan 2023
  • A note from our sponsor - SaaSHub
    www.saashub.com | 29 May 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source unit-testing projects in C? This list will help you:

Project Stars
1 Criterion 1,935
2 Muon 150
3 qtools 124
4 cauldron 117
5 c_koans 106
6 libGimbal 67
7 libcester 59
8 clove-unit 46
9 rexo 27
10 testdrive 2

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com