Consecutive failures may lead to a "success" in unit tests
I have noticed you use the following structure when checking the success of a unit tests:
bool success = true;
success &= some_complicated_test(); // return success
success &= another_complicated_test(); // return success
...
return !success;
This is problematic because certain patterns of failures will lead success
to be true
(e.g. pair number of failures). It may be corrected with the following structure.
bool failure = false;
failure |= some_complicated_test(); // return failure
failure |= another_complicated_test(); // return failure
...
return failure;