Add another set of tests (that mirror existing ones) but run through Valgrind, like this:
valgrind -v --leak-check=full ./tests
The expected output should ultimately be something like:
==12384== HEAP SUMMARY:
==12384== in use at exit: 0 bytes in 0 blocks
==12384== total heap usage: 516 allocs, 516 frees, 13,873 bytes allocated
==12384==
==12384== All heap blocks were freed -- no leaks are possible
==12384==
==12384== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==12384== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
The test should verify that no leaks are possible.
Add another set of tests (that mirror existing ones) but run through Valgrind, like this:
The expected output should ultimately be something like:
The test should verify that no leaks are possible.