# Snaipe/Criterion

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

Repository: https://github.com/Snaipe/Criterion
Canonical: https://ross.abutalabs.com/products/criterion
Language: C
License: MIT
License Family: permissive
Topics: c, c-plus-plus, unit-testing, framework, kiss, cross-platform
Last push: 2026-07-17T20:50:46+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 20, longevity 100
- inputs: {"age_days": 4232, "days_push": 47, "days_rel": 323, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2297, forks 189 (observed 2026-08-28T04:06:35.199519+00:00)

## What it is
Criterion is a cross-platform unit testing framework for C and C++ that automatically registers tests and provides a xUnit-style structure with minimal boilerplate. Tests run in isolated processes so crashes and signals can be reported and asserted, with support for parameterized tests, theories, and TAP output.

## Use cases
- unit test c code without boilerplate
- test c++ code with a unified framework
- assert that code crashes or raises signals
- write parameterized tests and theories in c
- output test results in TAP format for CI
- run tests on linux, macos, and windows

## When to choose
- you write C99 or C++11 code and want automatic test registration with no main function
- you need process-isolated tests that survive and report crashes
- you want one framework working identically for both C and C++ across platforms

## When to avoid
- you need a header-only or single-file test framework
- your toolchain doesn't support the platforms Criterion targets
- you prefer a minimal assert-only library like MinUnit or Catch2-style single headers

## Facets
- artifact type: library
- maturity: active
- function: testing, e2e-testing
- domain: testing, developer-tools, cross-platform
- platform: windows, bsd, cross-platform, cpp, c
- tags: unit-testing, xunit, c99, cpp11, tap-output, parameterized-tests, test-isolation, linux, macos

## Member repositories
- Snaipe/Criterion (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:35.199519+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:40:17.906860+00:00, confidence not recorded.
  - readme: https://github.com/Snaipe/Criterion (fetched 2026-08-28T04:06:35.199519+00:00, sha 2a341cd7fdcb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
