Skip to content

tdd-starters/cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple starter for TDD in C++.

The file test/calculator_test.cpp contains one test case and a few in comments. Start by coming up with a few test cases and add them to the lists, then implement them one at a time, test-driving the solution forwards.

Build

Build the project using the following commands.

git clone https://github.com/tdd-starters/cpp.git
cd cpp
cmake -S. -Bbuild 
cmake --build build

Test

Tests can be run directly in your IDE, for example CLion, or through the command line using one of the following methods

Using ctest

cd build
ctest

Using unit_tests

cd build
./bin/unit_tests

Acknowledgments

This project borrows from bast/gtest-demo.