mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
Initial work for G-code sender and more intensive usage of Boost
This commit is contained in:
parent
43cbad8867
commit
11dd67ab34
1649 changed files with 1860 additions and 1642 deletions
90
xs/include/boost/test/impl/interaction_based.ipp
Normal file
90
xs/include/boost/test/impl/interaction_based.ipp
Normal file
|
@ -0,0 +1,90 @@
|
|||
// (C) Copyright Gennadiy Rozental 2005-2008.
|
||||
// Use, modification, and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// 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 : Facilities to perform interaction-based testing
|
||||
// ***************************************************************************
|
||||
|
||||
#ifndef BOOST_TEST_INTERACTION_BASED_IPP_112105GER
|
||||
#define BOOST_TEST_INTERACTION_BASED_IPP_112105GER
|
||||
|
||||
// Boost.Test
|
||||
#include <boost/test/detail/config.hpp>
|
||||
|
||||
#if BOOST_TEST_SUPPORT_INTERACTION_TESTING
|
||||
|
||||
// Boost.Test
|
||||
#include <boost/test/detail/config.hpp>
|
||||
#include <boost/test/utils/callback.hpp>
|
||||
#include <boost/test/interaction_based.hpp>
|
||||
#include <boost/test/mock_object.hpp>
|
||||
#include <boost/test/framework.hpp> // for setup_error
|
||||
|
||||
#include <boost/test/detail/suppress_warnings.hpp>
|
||||
|
||||
// STL
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace itest { // interaction-based testing
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** manager ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
manager::manager()
|
||||
{
|
||||
instance_ptr( true, this );
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
manager::~manager()
|
||||
{
|
||||
instance_ptr( true );
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
manager*
|
||||
manager::instance_ptr( bool reset, manager* new_ptr )
|
||||
{
|
||||
static manager dummy( 0 );
|
||||
|
||||
static manager* ptr = &dummy;
|
||||
|
||||
if( reset ) {
|
||||
if( new_ptr ) {
|
||||
BOOST_TEST_SETUP_ASSERT( ptr == &dummy, BOOST_TEST_L( "Can't run two interation based test the same time" ) );
|
||||
|
||||
ptr = new_ptr;
|
||||
}
|
||||
else
|
||||
ptr = &dummy;
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
} // namespace itest
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
#include <boost/test/detail/enable_warnings.hpp>
|
||||
|
||||
#endif // not ancient compiler
|
||||
|
||||
#endif // BOOST_TEST_INTERACTION_BASED_IPP_112105GER
|
Loading…
Add table
Add a link
Reference in a new issue