14.2 Frameworks
It is best to use a framework to write and execute your unit tests. There are different implementations for different languages, including C++. At the end of this chapter, I will introduce you to an example framework.
Certain terms have become established across frameworks. These are found as standard procedures grouped under the term xUnit. The following explanations are related in Figure 14.3:
-
TestA test is a special function that is called by the framework. Everything in unit testing revolves around tests, because a single test tests a single unit, a functionality. Within a test, you call the function to be tested and then write one or more assertions to verify the correct functionality.
-
AssertionOne assertion is performing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access