Boost logo

Boost Users :

From: Gustavo Ribeiro Alves (gralves_at_[hidden])
Date: 2006-03-17 01:33:09


I'm trying to register some user exceptions on the unit_test framework
so I did the following:

#include <boost/test/unit_test.hpp>
using boost::unit_test::register_exception_translator;

.
.
.
void translate_InvalidInterval(const Interval::InvalidInterval& e) {
}

void translate_NotIntercept(const Interval::NotIntercept& e) {
}

interval_test_suite::interval_test_suite() :
        test_suite ("interval_test_suite") {
        
        boost::unit_test::register_exception_translator<Interval::InvalidInterval>
                        (translate_InvalidInterval);
        
        boost::unit_test::register_exception_translator< Interval::NotIntercept>
                        (translate_NotIntercept);
.
.
.
}

I get the following compile error:

error: 'boost::unit_test::register_exception_translator' has not been declared

I tried to grep all .hpp files on /boost/test to find if some of them
have this function. The only one (execution_monitor.hpp) I found has
it as part of a class.

I was expecting it as a template function in the framework.

So, how what do I have to include to make this work?


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