Do only what is needed to pass
When writing code, it’s easy to think of all the possibilities of how a method might be used, for example, and to write code to handle each possibility right away. This gets easier with experience and is normally viewed as a good way to write robust code without forgetting to handle different use cases or error conditions.
I urge you to scale back your eagerness to write all this at once. Instead, do only what is needed to pass a test. Then, as you think of other use cases, write a test for each, before extending your code to handle them. The same applies to error cases. As you think of some new error handling that should be added, write a test that will cause that error condition to arise before handling it in your code.
To see how this is done, let’s extend the test library to allow for expected exceptions. We have two test cases right now:
#include "../Test.h"
TEST("Test can be created")
{
}
TEST("Test...