{"id":15030599,"url":"https://github.com/snaipe/criterion","last_synced_at":"2025-05-13T22:04:58.346Z","repository":{"id":1683294,"uuid":"30111969","full_name":"Snaipe/Criterion","owner":"Snaipe","description":"A cross-platform C and C++ unit testing framework for the 21st century","archived":false,"fork":false,"pushed_at":"2025-04-13T13:14:56.000Z","size":3961,"stargazers_count":2114,"open_issues_count":76,"forks_count":183,"subscribers_count":53,"default_branch":"bleeding","last_synced_at":"2025-04-28T15:18:41.916Z","etag":null,"topics":["c","c-plus-plus","cross-platform","framework","kiss","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Snaipe.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-31T12:45:39.000Z","updated_at":"2025-04-28T14:07:13.000Z","dependencies_parsed_at":"2024-09-21T06:00:44.744Z","dependency_job_id":"43a068ed-7f6f-4925-86dd-82e45f0cac8f","html_url":"https://github.com/Snaipe/Criterion","commit_stats":{"total_commits":1405,"total_committers":43,"mean_commits":"32.674418604651166","dds":"0.21352313167259784","last_synced_commit":"2f48d0f23c536f7dd8bbcd798858cca6aa9c1924"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snaipe%2FCriterion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snaipe%2FCriterion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snaipe%2FCriterion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snaipe%2FCriterion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Snaipe","download_url":"https://codeload.github.com/Snaipe/Criterion/tar.gz/refs/heads/bleeding","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251336400,"owners_count":21573189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","c-plus-plus","cross-platform","framework","kiss","unit-testing"],"created_at":"2024-09-24T20:13:49.242Z","updated_at":"2025-04-28T15:18:47.688Z","avatar_url":"https://github.com/Snaipe.png","language":"C","readme":"\u003ch1\u003e\u003cimg src=\"doc/criterion-title.png\" height=\"96\" alt=\"Criterion Logo\" /\u003e\u003c/h1\u003e\n\n[![Build Status](https://api.cirrus-ci.com/github/Snaipe/Criterion.svg)](https://cirrus-ci.com/github/Snaipe/Criterion)\n[![Coverage Status](https://img.shields.io/codecov/c/github/Snaipe/Criterion/bleeding.svg)](https://codecov.io/github/Snaipe/Criterion?branch=bleeding)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Snaipe/Criterion/blob/master/LICENSE)\n[![Version](https://img.shields.io/github/release/Snaipe/Criterion.svg?label=version)](https://github.com/Snaipe/Criterion/releases/latest)\n[![Documentation (Stable)](https://img.shields.io/badge/docs-stable-green)][online-docs]\n[![Documentation (Bleeding)](https://img.shields.io/badge/docs-bleeding-orange)][online-docs-latest]\n\nA dead-simple, yet extensible, C and C++ unit testing framework.\n\n![Screencast](./doc/screencast.gif)\n\n## Philosophy\n\nMost test frameworks for C require a lot of boilerplate code to\nset up tests and test suites -- you need to create a main,\nthen register new test suites, then register the tests within\nthese suites, and finally call the right functions.\n\nThis gives the user great control, at the unfortunate cost of simplicity.\n\nCriterion follows the KISS principle, while keeping the control\nthe user would have with other frameworks:\n\n* [x] C99 and C++11 compatible.\n* [x] Tests are automatically registered when declared.\n* [x] Implements a xUnit framework structure.\n* [x] A default entry point is provided, no need to declare a main\n  unless you want to do special handling.\n* [x] Test are isolated in their own process, crashes and signals can be\n  reported and tested.\n* [x] Unified interface between C and C++: include the criterion header and it *just* works.\n* [x] Supports parameterized tests and theories.\n* [x] Progress and statistics can be followed in real time with report hooks.\n* [x] TAP output format can be enabled with an option.\n* [x] Runs on Linux, FreeBSD, macOS, and Windows (Compiling with MinGW GCC and Visual Studio 2015+).\n\n## Downloads\n\n### Packages\n\n| Platform | Command |\n| --- | --- |\n**Ubuntu** (\u003e=21.04) / **Debian** (\u003e=11) | `apt-get install libcriterion-dev`\n**Gentoo** | `emerge -a dev-libs/criterion`\n**Arch Linux** ([AUR][aur]) | `pacaur -S criterion`\n**macOS** | `brew install criterion`\n**Nix** | `nix-shell -p criterion`\n**FreeBSD** | `pkg install criterion`\n\nIf you'd like to see Criterion included in your favorite distribution, please reach out to their package maintainers team.\n\n### Binary archives\n\nBinary releases for Linux x86\\_64 are available [on the release page](https://github.com/Snaipe/Criterion/releases).\n\nIf you have a different platform, you can still [build the library from source](http://criterion.readthedocs.org/en/latest/setup.html#installation).\n\n## Developer Resources\n\n### Documentation\n\nAn online documentation is available on [ReadTheDocs][online-docs]\n([PDF][pdf-docs] | [Zip][zip-docs] | [Epub][epub-docs])\n\n### Samples\n\nSample tests can be found in the [sample directory][samples].\n\n* [A simple test][sample-simple]\n* [Using multiple suites][sample-suites]\n* [Writing assertions][sample-asserts]\n* [Adding test fixtures][sample-fixtures]\n* [Tests with signals][sample-signal]\n* [Using report hooks][sample-report]\n\n### Getting help\n\n| Channel | Description |\n| --- | --- |\n[![Ask a question in GitHub discussions](https://img.shields.io/badge/github-Ask%20a%20question-46BC99.svg)][gh-discussions] | Ask a question in GitHub discussions\n[![Subscribe to the mailing list](https://img.shields.io/badge/ml-criterion@freelists.org-46BC99.svg)][mailing-list] | Criterion mailing list on freelists.org\n\n### Misc\n\n* [autotools skeleton for projects with criterion tests][autotools]\n* [CMake find module for Criterion][find-module]\n\n## Credits\n\nCriterion is built with the following projects:\n\n* [boxfort](https://github.com/diacritic/BoxFort)\n* [debugbreak](https://github.com/MrAnno/debugbreak)\n* [libffi](https://sourceware.org/libffi/)\n* [klib](http://attractivechaos.github.io/klib/)\n* [libcsptr](https://github.com/Snaipe/libcsptr)\n* [nanomsg](http://nanomsg.org/)\n* [nanopb](http://koti.kapsi.fi/jpa/nanopb/)\n\nLogo made by [Paul Bouigue](http://www.cargocollective.com/pbouigue).\n\n[online-docs]: http://criterion.readthedocs.org/\n[online-docs-latest]: http://criterion.readthedocs.org/en/latest\n[pdf-docs]: http://readthedocs.org/projects/criterion/downloads/pdf/latest/\n[zip-docs]: http://readthedocs.org/projects/criterion/downloads/htmlzip/latest/\n[epub-docs]: http://readthedocs.org/projects/criterion/downloads/epub/latest/\n\n[samples]: ./samples/\n[sample-simple]: ./samples/simple.c\n[sample-suites]: ./samples/suites.c\n[sample-asserts]: ./samples/asserts.c\n[sample-fixtures]: ./samples/fixtures.c\n[sample-signal]: ./samples/signal.c\n[sample-report]: ./samples/report.c\n\n[autotools]: ./dev/autotools\n[find-module]: ./dev/cmake/cmake/FindCriterion.cmake\n\n[aur]: https://aur.archlinux.org/packages/criterion/\n\n[mailing-list]: http://www.freelists.org/list/criterion\n[gh-discussions]: https://github.com/Snaipe/Criterion/discussions/new?category=q-a\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnaipe%2Fcriterion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnaipe%2Fcriterion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnaipe%2Fcriterion/lists"}