|
C++Spec 1.0.0
BDD testing for C++
|
A behavior-driven development testing library for C++ with an RSpec-inspired DSL.
See http://cppspec.readthedocs.org/ for full documentation and a tutorial.
C++Spec requires a compiler and standard library with C++23 support. Currently tested:
Note: Only spec files require C++23 (-std=c++23). No other part of an existing project's build needs modification.
The recommended approach is to integrate C++Spec as a CMake subproject:
Spec files are picked up automatically with:
This creates a separate CTest executable for every file ending in _spec.cpp in the given directory (recursive).
If you've ever used RSpec or Jasmine, chances are you'll be familiar with C++Spec's syntax. For example, this is a C++Spec version of the first snippet on RSpec's README.
Heavily inspired by RSpec and Jasmine.
Copyright © 2014-2024 Katherine Whitlock
The project is licensed under the MIT License.