Skip to content

arpinum/tdd-kit-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TDD Kit - C++

Requirements

Build GTest and GMock

Clone latest googletest release (ex release-1.8.0):

git clone --branch release-1.8.0 https://github.com/google/googletest.git

Build GTest:

cd google_test_dir/googletest
cmake .
make

Build GMock:

cd google_test_dir/googlemock
cmake .
make

Export GTest and GMock env variables

export GTEST_ROOT=google_test_dir/googletest
export GMOCK_ROOT=google_test_dir/googlemock

You can also set those variables in your .profile.

Generate Makefile for tdd-kit-cpp

mkdir build
cd build
cmake ..

Build

make

Run unit tests

./runtests

Run tests inside Docker

You can use the provided Docker image to run tests inside a container if you do not want to install requirements.

Build the Docker image:

docker build -t tdd-kit-cpp .

Run the tests:

docker run --rm tdd-kit-cpp

Mount your source folder in the container to keep sources updated:

docker run --rm -v ${PWD}/src tdd-kit-cpp

Mount any directory as a build folder to speed up compilation time:

docker run --rm -v ${PWD}/src -v /tmp/build:/build tdd-kit-cpp

Documentation

License

MIT

About

Base project to learn TDD with C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published