Boost logo

Boost :

From: Gennadiy Rozental (gennadiy_at_[hidden])
Date: 2002-09-04 04:02:44


Hi,

Responding to requests for lightweight testing I implemented header
boost/test/minimal.hpp.
   Using of this header is similar to the using of Boost.Test v1. you
including the header and implement test_main function. Minimal test keeps
track on number of error and provide unified error logging in case of both
fatal and non fatal errors. BOOST_INCLUDE_MAIN is not used. main is
included unconditionally. One consequence is that minimal test could not be
used for multi-unit testing. You will need to use other Boost.Test
components for that.
  Minimal test support following tools:

BOOST_CHECK( exp ) - check that supplied expression is evaluating to
true. Print error message if check fails
BOOST_REQUIRE( exp ) - check that supplied expression is evaluating to
true. Print error message if check fails and abort testing

Error message format: file(line): test "exp" failed [in function "name of
the function"]
in function part is optional and is present only if compiler supports it.

BOOST_ERROR( msg ) - Print supplied error message unconditionally
BOOST_FAIL( msg ) - Print supplied error message unconditionally
and abort testing

BOOST_TEST, BOOST_CRITICAL_TEST and BOOST_CRITICAL_ERROR are supported in
this version but will be deprecated in a future.

Usage if minimal test should have produce significant compile time overhead.

Also if you did not remark it from one of the messages in some unrelated
queue, there is another addition. To support library-less usage of
Bosot.Test v2 components I introduced
3 new headers in subdirectory boost/test/included:
boost/test/included/prg_exec_monitor.hpp
boost/test/included/test_exec_monitor.hpp
boost/test/included/unit_test_framework.hpp

If you use these headers you are agree with possibly some compile time
overhead but you won't need to link with precompiled component's library.

Comments?

Gennadiy.

P.S. Should I try to reflect this changes in docs before the release?


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