Creating and Running Tests

In this chapter, we will cover the following recipes:

  • Creating a simple unit test
  • Defining a unit test using the Catch2 library
  • Defining a unit test and linking against Google Test
  • Defining a unit test and linking against Boost test
  • Using dynamic analysis to detect memory defects
  • Testing expected failures
  • Using timeouts for long tests
  • Running tests in parallel
  • Running a subset of tests
  • Using test fixtures

Get CMake Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.