2
0
mirror of https://github.com/boostorg/test.git synced 2026-02-09 23:42:17 +00:00

*** empty log message ***

[SVN r32049]
This commit is contained in:
Gennadiy Rozental
2005-12-14 06:01:02 +00:00
parent eea5d0bc41
commit c96ffdf25e
34 changed files with 428 additions and 488 deletions

View File

@@ -13,8 +13,8 @@
// ***************************************************************************
// Boost.Test
#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/test/unit_test_log.hpp>
#include <boost/test/output_test_stream.hpp>
#include <boost/test/execution_monitor.hpp>
@@ -77,9 +77,9 @@ output_test_stream& ots()
if( !inst ) {
inst.reset(
auto_unit_test_suite()->argc <= 1
framework::master_test_suite().argc <= 1
? new output_test_stream( runtime_config::save_pattern() ? save_file_name : match_file_name, !runtime_config::save_pattern() )
: new output_test_stream( auto_unit_test_suite()->argv[1], !runtime_config::save_pattern() ) );
: new output_test_stream( framework::master_test_suite().argv[1], !runtime_config::save_pattern() ) );
}
return *inst;
@@ -136,7 +136,15 @@ TEST_CASE( test_BOOST_WARN )
TEST_CASE( test_BOOST_CHECK )
{
BOOST_CHECK( true );
// check correct behavior in if clause
if( true )
BOOST_CHECK( true );
// check correct behavior in else clause
if( false )
{}
else
BOOST_CHECK( true );
bool_convertible bc;
BOOST_CHECK( bc );
@@ -455,39 +463,47 @@ struct A {
friend std::ostream& operator<<( std::ostream& str, A const& a ) { str << "struct A"; return str;}
};
TEST_CASE( test_BOOST_MESSAGE )
TEST_CASE( test_BOOST_TEST_MESSAGE )
{
unit_test_log.set_threshold_level( log_messages );
BOOST_MESSAGE( "still testing" );
BOOST_MESSAGE( "1+1=" << 2 );
BOOST_TEST_MESSAGE( "still testing" );
BOOST_TEST_MESSAGE( "1+1=" << 2 );
int i = 2;
BOOST_MESSAGE( i << "+" << i << "=" << (i+i) );
BOOST_TEST_MESSAGE( i << "+" << i << "=" << (i+i) );
A a = A();
BOOST_MESSAGE( a );
BOOST_TEST_MESSAGE( a );
#if !defined(BOOST_NO_STD_LOCALE) && ( !defined(BOOST_MSVC) || BOOST_WORKAROUND(BOOST_MSVC, >= 1310))
BOOST_MESSAGE( std::hex << std::showbase << 20 );
BOOST_TEST_MESSAGE( std::hex << std::showbase << 20 );
#else
BOOST_MESSAGE( "0x14" );
BOOST_TEST_MESSAGE( "0x14" );
#endif
BOOST_MESSAGE( std::setw( 4 ) << 20 );
BOOST_TEST_MESSAGE( std::setw( 4 ) << 20 );
}
//____________________________________________________________________________//
TEST_CASE( test_BOOST_CHECKPOINT )
TEST_CASE( test_BOOST_TEST_CHECKPOINT )
{
BOOST_CHECKPOINT( "Going to do a silly things" );
BOOST_TEST_CHECKPOINT( "Going to do a silly things" );
throw "some error";
}
//____________________________________________________________________________//
TEST_CASE( test_BOOST_TEST_PASSPOINT )
{
int* p = 0;
BOOST_CHECK( *p == 0 );
}
//____________________________________________________________________________//
TEST_CASE( test_BOOST_IS_DEFINED )
{
#define SYMBOL1
@@ -506,10 +522,15 @@ TEST_CASE( test_BOOST_IS_DEFINED )
//____________________________________________________________________________//
// !! CHECK_SMALL
// ***************************************************************************
// Revision History :
//
// $Log$
// Revision 1.44 2005/12/14 06:01:02 rogeeff
// *** empty log message ***
//
// Revision 1.43 2005/05/11 05:07:57 rogeeff
// licence update
//