In article
Hi all. The boost unit test framework seems to lack the xUnit buildUp/tearDown (whatever) methods meant to faciliate the creation of fixtures. Does that mean there is an alternative idiom to achieve the same effect ? Constructing new class-test-cases for each test seems a bit overkill.
If I understand what buildUp and tearDown do, then the answer is "local variables". I'm not (yet) familiar with boost's unit test framework, but I have my own framework that I built based on a design description on Ward's Wiki Robert DiFalco. One quibble I had with Robert's design was the (late) inclusion of fixtures, which seemed entirely unnecessary in C++. (I'm a little uncertain of why they would be necessary in JUnit, where they apparently come from, but I don't have programming experience with Java.) See http://www.c2.com/cgi/wiki?CppUtxOverview. Near the bottom of the page are my comments about test fixtures. -- Dan Muller "So that's what an invisible barrier looks like!" (Time Bandits)