Skip to content

LearnWithLlew/TestingLegacyCodeCourse.cpp

Repository files navigation

Workshop: Testing Legacy C++ Code effectively with Approval Tests

Course tutors: Llewellyn Falco and Clare Macrae

Exercises

Building the code

Assumptions

Get this code

git clone https://github.com/LearnWithLlew/TestingLegacyCodeCourse.cpp.git

Using a CMake-aware IDE

  • Using Clion, or any other CMake-aware IDE, you should be able to open this repository's directory on your machine, and the IDE will create the project for you.

Building and Testing Using CMake and CTest

cd TestingLegacyCodeCourse.cpp
mkdir cmake-build-debug
cd    cmake-build-debug

# Create the build commands:
cmake .. -DCMAKE_BUILD_TYPE=Debug

# Build the project
cmake --build .

# Run the tests
ctest .  -C Debug --output-on-failure

How to set up code coverage

References and links