$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-06-10 03:40:50
Hi,
I finally mostly finished first long promised revision for Boost.Test.
Here is the list of major features/updates:
* Major update for documentation
I still think that docs need a lot of work. They incomplete and there are
several pages missing. Also some tutorial material needs to be extended. I
reworked documentation structure. All suggestions and comment in this regard
are welcome.
* BOOST_CHECK_EXCEPTION
New tool allows not only check that desired exception has thrown, but also
validate a predicate with an exception as an argument.
* Test cases/suites dependency support
Now one should be able to say: "do not run this test case/suite unless
that test case passed"
Syntax:
test_case_1->depend_on( test_case_2 );
* zero arity function template based test case.
This is the case met several times in boost libraries tests: run some
function several times with different template parameter as an template
argument. Unfortunately due to some C++ limitation I did not find a solution
with out extra out of function support. Here is the syntax:
template<typename T>
void my_foo( ) // add parameter T* =0 if you want it to work under MSVC 6.5
{
...
}
BOOST_META_FUNC_TEST_CASE( my_foo );
...
test->add( BOOST_FUNC_TEMPLATE_TEST_CASE( my_foo, types_list ) );
Above statement will make the framework to run the function my_foo<type>(),
instantiated with all types in provided as a second argument type list.
* Smart predicates support
In some cases users want to be able to perform complex check and in
combination with result to return error message with explanation
I moved extended_predicate_value into public interface. Now used could
return instance if this class that could hold boolean value and error
message from a predicate. The framework will use the supplied error message
for error logging
* Support for non-printable types
In some cases users forced to use less descriptive tools because more
descriptive would require presence of the output operator<<()
For example:
std::list<int> my_list, expected_list;
...
BOOST_CHECK_EQUAL( my_list, expected_list );
Now this does not work cause std::list<int> does not have an operator<<()
defined. To address this I added extra decision point which function to use
to print the value. One could overwrite this function to use custom print
mechanism. Also helper macro
BOOST_TEST_DONT_PRINT_LOG_VALUE( type_name ) introduced, that automatically
prevent compilation error in above case. Use it outside of test function
definition
BOOST_TEST_DONT_PRINT_LOG_VALUE( std::list<int> )
....
BOOST_CHECK_EQUAL( my_list, expected_list ); // Now works
BOOST_CHECK_EQUAL( my_list, expected_list );
* many bug fixes and minor enhancements
Update is available in cvs. Let me know about any issues.
Regards,
Gennadiy.