What is short-circuit evaluation in C++? Short-circuit evaluation is a behavior of logical operators in C++ where the second part of an expression is evaluated only if it is necessary to determine the final result. For example, in an expression using the logical OR operator, if the left-hand side already…
gtest
Parameters combinations in GoogleTest
Welcome to the next pikoTutorial! Parameterized unit tests are priceless. They help to test code thoroughly through multiple possible input values, without having to write multiple and almost the same unit tests – if you have a function accepting an enum and output for some of them is the same,…
Functions calling order in unit tests in C++
To ensure a certain order of function calls, GTest provides 2 ways to do that: InSequence and Sequence objects.