cpp11training
cpp11training copied to clipboard
Make unit tests run to exercise your C++11 knowledge
cpp 11 training
Exercises to train your C++11/14/17 (and then some).
Getting started
Linux
On Linux all you need is a compiler with C++17 support; gcc-7 and gcc-8 have it.
git clone [email protected]:xtofl/cpp11training
mkdir -p cpp11training/build
cd cpp11training/build
cmake ../src
make
Windows
Prerequisite: currently I have it up and running for Visual Studio 2017 Community edition. It relies on NuGet package manager, which should be installed explicitly (cf. stackoverflow)
Open the cpp11training/cpp11training.sln
solution.
Docker host
If you don't want to litter your system with tools you don't trust, but you do trust Docker, you can
build and run the docker container in docker. You may even be in luck and simply docker pull xtofl/cpp11training
.
Then, clone the repository, and start a cpp11training container. Now you can follow the steps like in Linux.
(windows users may be happy to find a run_container.bat
script to help)
Exercising
The project contains a bunch of failing unit tests. The idea is that you un-DISABLE each one of them, and make it pass (using C++11, obviously). (the gtest library by default ignores tests starting with DISABLED_
.)
I tried to add a TODO: comment hinting what's expected from you to fulfill the exercise.
Once all tests pass, I have nothing more to teach you :)