Boost logo

Boost Users :

From: gast128 (gast128_at_[hidden])
Date: 2007-08-03 17:38:16


At our company we had written quite a few test cases using the old test
library, which seems to be broken using the new DLL infra structure instead of
the old static libraries.

So after some hours (and frustration) I got it finally working again. Good
documentation could really have helped here. In case others experience the
same problem, here is a workaround.

Define your own main function and intialise the libraries there, e.g.:

bool Hack()
{
   char** pp = NULL;

   boost::unit_test::framework::master_test_suite().p_name.value = "test";
   boost::unit_test::framework::master_test_suite().add( init_unit_test_suite
(0, pp) );
   
   return true;
}

int main(int argc, char* argv[])
{
   //Note: this is just a q&&d way to get the 1.33
   //tests compilable with the 1.34 UTF.
   
   return boost::unit_test::unit_test_main( &Hack, argc, argv );
}

This is not very impressive, but if you are not an expert in the test library
and just a dumb user, it can really take a while.

Wkr,
me


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net