optionally verbose assertions
spir
denis.spir at gmail.com
Thu Apr 14 11:43:30 PDT 2011
On 04/14/2011 06:52 PM, Steven Schveighoffer wrote:
> A compromise might be to be able to name unit tests, and then run a specific
> unit test by name on execution only. This allows you to ensure a specific unit
> test (and specific asserts in that unit test) are running without having to see
> all the asserts from the other unit tests, but also allows using asserts for
> general example code/testing.
This is precisely why I often have a single unittest block, that controls
actual test funcs (which have names :-)
void test1 () {...}
void test2 () {...}
void test3 () {...}
unittest {
// just uncomment func calls you want to run
//~ test1();
//~ test2();
//~ test3();
}
void main () {}
Denis
--
_________________
vita es estrany
spir.wikidot.com
More information about the Digitalmars-d
mailing list