Boost logo

Boost Testing :

Subject: Re: [Boost-testing] Boost.Test: ~test_suite() is protected
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-04-17 03:52:35


manyu <abhimanyu.aditya <at> gmail.com> writes:

>
>
> Hi, I'm new to linux and boost so if I am doing something stupid pardon me. I
> am trying to incorporate boost testing into my project. The plan is to build
> a bunch of test suites hierarchially. This is the first one I was making:

1. What version of Boost r u using?
2. Why don't you try using automatic registration facilities?

> test_suite* init_unit_test_suite(int arv, char** argc)
> {
> // create the top test suite
> std::auto_ptr<test_suite> top_test_suite(BOOST_TEST_SUITE("Master test
> suite"));

....

> /usr/include/boost/test/unit_test_suite_impl.hpp:130: error: ‘virtual
> boost::unit_test::test_suite::~test_suite()’ is protected

The error is not subtle. It indicates specifically that you can't delete
instances of test_suite. And you should not. Framework will deal with memory
allocation/deallocation.

Gennadiy


Boost-testing list run by mbergal at meta-comm.com