Testing this one will be much like project 6, but rather short. Remember to build your testing module as you go, with good labels and test cases right from the start.
To test your constructor, print the values you are initializing the string to, then print the strings you created. You should also print the length and capacity to make sure they are correct.
Then, all you really have left to test is operator==. To test that the destructor is deleting the array properly, you can run your program in Valgrind.
Remember to test a variety of string sizes and contents.
The only thing you have to check this time is memory allocation. You can do this the same way as in the course pack (ex. 32) or lab 9, and print an error and exit in the same way as well.
However, you should still avoid printing error messages elsewhere in container classes -- almost anywhere you think of putting one will be inappropriate. In general, it's better to throw exceptions or let other people's exceptions filter up. We'll return to error printing in our next end-user application.