Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 457 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 457 Bytes

Creating a simple unit test

In this recipe we use CTest to unit test a simple example code which sums all natural numbers from 1 to 100.

To show that CMake does not impose any restrictions on the language to implement the actual tests, the example code is tested using not only a C++ executable, but also using a Python script and a shell script. For simplicity, this is demonstrated without using any testing libraries.