Closed gkaracha closed 3 years ago
I also pushed an extra commit here. PS. ounit2 also has a "bracket" combinator which might well be useful in some cases where there is common setup code: https://gildor478.github.io/ounit/ounit2/OUnit/index.html#bracket
Thanks! Good tip for the bracket also, I didn't know of it but I'm pretty sure we have quite some setup, here and there. Might come in handy :+1:
I forgot to mention that one general point here was something that I've seen in any number of languages with test frameworks: whenever you can refactor a test with multiple clauses into multiple tests, you potentially get more granular and useful failures. So although there's also a benefit to eliminating the possibility of consecutive clauses affecting each other via side effects, the granularity was what prompted me to add the refactoring commit.
Test coverage also increases (from 84.32% to 85.14%).