Boost logo

Boost :

Subject: [boost] [boost.test] Correct usage?
From: Philip Bennefall (philip_at_[hidden])
Date: 2013-08-31 05:38:00


Hello,

I just started writing unit tests for a large project that I am involved in,
and boost.test has been absolutely fantastic to work with so far. True the
documentation could be clearer, but as far as functionality I am very much
impressed with the library. I have a question though.

I read the following:
http://lists.boost.org/Archives/boost/2011/10/186439.php

This concerns me. What is the status here? When I build boost_1_54_0, in my
stage/lib directory I see:
libboost_test_exec_monitor-vc100-mt-s-1_54.lib

My test cases look as follows:

#define BOOST_TEST_MODULE MyProgram
#include <boost/test/unit_test.hpp>

BOOST_FIXTURE_TEST_SUITE(basic_operations, basic_memory_logger)

BOOST_AUTO_TEST_CASE( some_test )
{
// ...
// Using BOOST_REQUIRE_EQUAL, BOOST_CHECK_EQUAL, BOOST_CHECK,
BOOST_REQUIRE_EQUAL_COLLECTIONS and friends here.
}

BOOST_AUTO_TEST_SUITE_END()

My questions are:

1. Are all these macros still supported and not depricated?

2. Is the structure correct? Am I depending on something depricated? Am I
including the right header? I am linking with the library mentioned above
(via auto-linking), which is why I am concerned about deprication.

Thanks in advance for any clarification on this.

Kind regards,

Philip Bennefall


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk