https://github.com/Snaipe/Criterion Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} Snaipe / Criterion Public * Notifications * Fork 144 * Star 1.3k * A cross-platform C and C++ unit testing framework for the 21st century MIT License 1.3k stars 144 forks Star Notifications * Code * Issues 43 * Pull requests 3 * Discussions * Actions * Projects 1 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. bleeding Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 6 branches 29 tags Code Latest commit @MrAnno MrAnno subprojects: bump boxfort revision ... 0f65b45 Feb 19, 2022 subprojects: bump boxfort revision - workaround for unimplemented mincore() on WSL 1 [skip actions] 0f65b45 Git stats * 1,476 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .githooks asserts: Implemented new composable assertion API. Jul 1, 2017 .github/workflows ci: fast-forward bleeding or warn maintainers Feb 7, 2022 ci ci: fix cram tests on Windows Dec 17, 2021 dependencies dependencies: bump debugbreak revision Feb 12, 2022 dev autotools: update README Jan 11, 2021 doc doc: add debugging instructions for macOS Feb 12, 2022 include assert: fix C++ STL container tostr when compiled with older gcc Jan 6, 2022 po cmake: remove all files Dec 30, 2019 samples api,float: make infinity work with epsilon comparison Jan 3, 2022 src core: fall back to "idle" debugging method when debugger can not be f... Feb 12, 2022 subprojects subprojects: bump boxfort revision Feb 19, 2022 test test: avoid >=C++14 features Jan 6, 2022 .bumpversion.cfg v2.3.3: merging fix/247. Nov 5, 2018 .cirrus.yml ci: add arm32v7 build Jan 3, 2022 .gitignore meson: fix 'theories' option to be actually disableable Apr 5, 2020 .gitmodules dependencies: temporarily use debugbreak fork Feb 12, 2022 .uncrustify.cfg style: relax rules about brace removal & mandatory newlines after def... Apr 4, 2017 AUTHORS bookkeeping: updated authors and changelog Jan 3, 2022 CONTRIBUTING.md contributing: add section about testing changes Jan 31, 2018 ChangeLog changelog: add latest changes Feb 12, 2022 LICENSE license: We're in 2017. Jan 21, 2017 README.md readme: fix small grammatical error Jan 31, 2022 meson.build build: build static dependencies when using subprojects Feb 7, 2022 meson_options.txt build: add -Drpath-in-pkgconfig=enabled build option Jan 13, 2022 View code [ ] Philosophy Downloads Packages Binary archives Developer Resources Documentation Samples Getting help Misc Credits README.md Criterion Logo Build Status Coverage Status License Version Documentation (Stable) Documentation (Bleeding) A dead-simple, yet extensible, C and C++ unit testing framework. Screencast Philosophy Most test frameworks for C require a lot of boilerplate code to set up tests and test suites -- you need to create a main, then register new test suites, then register the tests within these suites, and finally call the right functions. This gives the user great control, at the unfortunate cost of simplicity. Criterion follows the KISS principle, while keeping the control the user would have with other frameworks: * [*] C99 and C++11 compatible. * [*] Tests are automatically registered when declared. * [*] Implements a xUnit framework structure. * [*] A default entry point is provided, no need to declare a main unless you want to do special handling. * [*] Test are isolated in their own process, crashes and signals can be reported and tested. * [*] Unified interface between C and C++: include the criterion header and it just works. * [*] Supports parameterized tests and theories. * [*] Progress and statistics can be followed in real time with report hooks. * [*] TAP output format can be enabled with an option. * [*] Runs on Linux, FreeBSD, macOS, and Windows (Compiling with MinGW GCC and Visual Studio 2015+). Downloads Packages * Ubuntu (>=21.04) / Debian (>=11): apt-get install libcriterion-dev, on older versions: $ sudo add-apt-repository ppa:snaipewastaken/ppa $ sudo apt-get update $ sudo apt-get install criterion-dev * Arch Linux (AUR): pacaur -S criterion * macOS: brew install mranno/tap/criterion Binary archives Binary releases are available on the release page If you have a different platform, you can still build the library from source Developer Resources Documentation An online documentation is available on ReadTheDocs (PDF | Zip | Epub ) Samples Sample tests can be found in the sample directory. * A simple test * Using multiple suites * Writing assertions * Adding test fixtures * Tests with signals * Using report hooks Getting help Channel Description Subscribe to the mailing list Criterion mailing list on freelists.org Join the chat at https://gitter.im/ Snaipe/Criterion on gitter.im Snaipe/Criterion Join #criterion on freenode #criterion on irc.freenode.net Misc * autotools skeleton for projects with criterion tests * CMake find module for Criterion Credits Criterion is built with the following projects: * boxfort * debugbreak * libffi * klib * libcsptr * nanomsg * nanopb Logo made by Paul Bouigue. About A cross-platform C and C++ unit testing framework for the 21st century Topics c c-plus-plus unit-testing framework cross-platform kiss Resources Readme License MIT License Stars 1.3k stars Watchers 50 watching Forks 144 forks Releases 26 v2.4.0 Latest Feb 21, 2022 + 25 releases Contributors 26 * @Snaipe * @MrAnno * @a1lu * @am11 * @ambroisie * @kevinoid * @tsieprawski * @Ethiraric * @offa * @Ersikan * @Eazhi + 15 contributors Languages * C 55.4% * C++ 31.8% * Perl 8.7% * Meson 1.5% * Shell 1.0% * Raku 0.9% * Other 0.7% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.