![](/media/96215/2_unit_test.gif)
A simple idea I wanted to share with you.
I use a p8 file with a few utility classes. I place the unit tests on the first tab.
When I run my library code, it tests it.
If I want to include my vector class, for example, in another program, I include it “#include utils.p8:1” (only tab 1). This way, the weight of my tests doesn't count on the other program.
I find this an elegant way of managing tested reusable code.
[Please log in to post a comment]