C++ testing made simple
#include <cest>
describe("DatabaseConnector", []() {
describe("connect()", []() {
it("succeeds at connecting to host", []() {
auto result = DatabaseConnector().connect();
expect(result).toEqual(Result::SUCCESS);
});
});
describe("disconnect()", []() {
it("fails to disconnect if not connected", []() {
auto result = DatabaseConnector().disconnect();
expect(result).toEqual(Result::FAILURE);
});
});
});
-
Get Started
Check out the quick start guide and start building your first test in a minute!
-
API Reference
Find all the nitty gritty details of Cest and make the most out of your tests.
Main features
Single Header
All features are included in a single C++ header,
making it easy to integrate into any project's existing pipeline. Just include cest
in each test file to compile a self-contained and runnable test
Powerful Test Runner
Avoid rolling your own code to manage test suites, and run all Cest tests with its built-in Runner. Filter tests by name or only run failed tests.
BDD inspired API
Write tests in a familiar BDD style, using it
, describe
, and expect
— no complex C++ knowledge required.
Feature rich from the get-go
Includes exception handling assertions, parametrized tests, pointer assertions, integration with STL collections, and more. Want more? Planned features include parametric tests, extended collection support, async execution support, and more
Create expressive tests for your C code
Are you creating a C application or library? Use Cest Framework to add expressivity and semantics to your C codebase, by using all the features provided by C++ in your tests.
Contribute to Cest Framework
Do you like Cest Framework? Are you planning on using it on your C or C++ projects? If you enjoy it, it would be great to have your Star in the GitHub repository!
Are you missing any feature? Open an issue and let's start the conversation to get it implemented.
Do you want to contribute? Check the contribution guide in the GitHub repository README file, and start improving Cest.
These are the current contributors of Cest. Click on their avatars to visit their GitHub profiles: