Boost logo

Boost Users :

Subject: Re: [Boost-users] [UTF] documentation
From: gast128 (gast128_at_[hidden])
Date: 2011-09-20 19:25:44


...even extending the question: I was replacing my home brew test framework with
Boost.Test but this has become an exercise in frustration. I have the following
setup:
- tests in DLLs which can be invoked multiple times during program run
- tests are invoked by another DLL which is steered from a GUI, in which u can
click which test(s) u want to (re-)run

So I need some kind of external test runner. The examples mentioned in the
documentation work all fine if one uses an exe which just invoke the test run
once. Unfortunately it doesn't work if you invoke the test multiple times. This
is not mentioned in the documentation but in a post 'Regarding use of Boost.Test
in Iteration'.

With my setup it also goes wrong in the setup phase. The DLL has a 'Run' with
should invoke the test(s):

void Run()
{
  char* aArgs[] = {"", "--run_test=KTestAlgoDifference,KTestAlgoEditDistance"};
         
  int nResult = boost::unit_test::unit_test_main(&init_unit_test,
count_array(aArgs), aArgs);
}

This invokes an exception on line 405 in framework.ipp.

Basically I have 3 options now:
1) study the complete Boost.Test framework internals so I actually know what I
am doing
2) Hope that the documentation includes a good example of using it with an
external test runner
3) Switch back to my own homemade thing

I hope this mail doesn't sound too harsh. For me libraries are meant to be used
as black boxes, but unfortunately I regularly end up in spitting through source
code because of some mysterious crash or exception (which ofc you don't know if
it is your fault or library)


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