-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Minimal CMake
By :
Testing is an incredibly broad topic, and often applications require many kinds of tests to provide effective coverage of their behavior and functionality. A benefit of CTest is it integrates with these diverse types of tests and allows them to be managed and run together. In this section, we’re going to look at two more kinds of tests that CTest helps support.
The first example we’ll cover is still technically a unit test, but we’re going to add it in the context of our application instead of going through the process of extracting the functionality to its own library. This can be useful to do in the short term if some functionality cannot or should not be extracted. The example we’ve selected is the viewport projection functions that map from world space to screen space and back again. Previously, these were added in our main.c (now main.cpp) file and could not be used in other files. We can extract these...