This template project has everything included to start with TDD right away.
- Google Test and Google Mock integration
- clang-format integration
- clang-tidy integration
- cmake-format integration
You will need:
- (must) A modern C/C++ compiler.
- (must) CMake 3.1+ installed.
- (may) The LLVM compiler if clang-format and clang-tidy shall be used.
- (may) Python 3 and cmake-format if cmake-format shall be used.
- (may) An IDE like Jetbrains CLion or VisualStudio 2019
cmake/*
- The cmake tools and helper filessrc/*
- C++ codetest/lib
- C++ libraries used for tests (eg, Google Test)test/src
- C++ test suitebin/
,lib/
,include/
empty directories, until themake install
command installs the project artifacts there.
- A
test
folder with the automated tests and fixtures that mimics the directory structure ofsrc
. - For every C++ file in
src/A/B/<name>.cpp
there is a corresponding test filetest/A/B/<name>_test.cpp
- Tests compile into a single binary
test/bin/runner
that is run on a command line to run the tests. test/lib
folder with a git submodule intest/lib/googletest
, and possibly other libraries.
© 2020 Christian Feichtinger.
Open sourced under MIT license, the terms of which can be read here — MIT License.