Boost-Geometry-Utils
view release on metacpan or search on metacpan
src/boost/test/impl/unit_test_suite.ipp view on Meta::CPAN
// (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 54633 $
//
// Description : privides core implementation for Unit Test Framework.
// Extensions can be provided in separate files
// ***************************************************************************
#ifndef BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
#define BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
// Boost.Test
#include <boost/detail/workaround.hpp>
#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/framework.hpp>
#include <boost/test/utils/foreach.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/detail/unit_test_parameters.hpp>
// Boost
#include <boost/timer.hpp>
// STL
#include <algorithm>
#include <vector>
#include <boost/test/detail/suppress_warnings.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \
/**/
using std::rand; // rand is in std and random_shuffle is in _STL
#endif
//____________________________________________________________________________//
namespace boost {
namespace unit_test {
// ************************************************************************** //
// ************** test_unit ************** //
// ************************************************************************** //
test_unit::test_unit( const_string name, test_unit_type t )
: p_type( t )
, p_type_name( t == tut_case ? "case" : "suite" )
, p_id( INV_TEST_UNIT_ID )
, p_name( std::string( name.begin(), name.size() ) )
, p_enabled( true )
{
}
//____________________________________________________________________________//
test_unit::~test_unit()
{
framework::deregister_test_unit( this );
}
//____________________________________________________________________________//
void
test_unit::depends_on( test_unit* tu )
{
m_dependencies.push_back( tu->p_id );
}
//____________________________________________________________________________//
bool
test_unit::check_dependencies() const
{
BOOST_TEST_FOREACH( test_unit_id, tu_id, m_dependencies ) {
if( !unit_test::results_collector.results( tu_id ).passed() )
return false;
}
return true;
}
( run in 0.602 second using v1.01-cache-2.11-cpan-39bf76dae61 )