Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2003-03-05 06:11:50


> I'd like to be able to run a boost unit test, e.g.
is_convertible_test.cpp, as kind of a one-shot apart from having to deal
with the rest of boost. So I read the documentation on the unit test
framework, and it seems like this should be relatively straightforward. I've
created a Carbon Console project in Codewarrior, which contains the
following files:
>
> is_convertible_test.cpp
> init.cpp (from type_traits/test)
> unit_test_main.cpp
> unit_test_suite.cpp
> unit_test_result.cpp
> unit_test_log.cpp
> unit_test_monitor.cpp
> execution_monitor.cpp
> unit_test_parameters.cpp
> test_tools.cpp
>
> This all compiles and links file, which is a relief in and of itself. :-)
>
> However, when I simply run the app, I get "*** No errors detected". If I
remove is_convertible_test.cpp and rebuild and run again, I get the same
result. :-) So my suspicion is that I need to do more to let the framework
know that it needs to run is_convertible_test.cpp. Can someone please clue
me in as to what that is, in minimal terms?

No you've got it right - it's just that the unit test lib doesn't report
much by default - if you look at the jamfile you will see that it uses the
following command line args:

--report_level=detailed --build_info=yes --log_level=messages

you can do all this with bjam BTW, with:

bjam is_convertible_test.test

Hope this helps,

John.


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