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
69
xs/include/boost/test/unit_test_monitor.hpp
Normal file
69
xs/include/boost/test/unit_test_monitor.hpp
Normal file
|
@ -0,0 +1,69 @@
|
|||
// (C) Copyright Gennadiy Rozental 2001-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: 49312 $
|
||||
//
|
||||
// Description : defines specific version of execution monitor used to managed
|
||||
// run unit of test cases. Translates execution exception into error level
|
||||
// ***************************************************************************
|
||||
|
||||
#ifndef BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
|
||||
#define BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
|
||||
|
||||
// Boost.Test
|
||||
#include <boost/test/execution_monitor.hpp>
|
||||
#include <boost/test/detail/fwd_decl.hpp>
|
||||
#include <boost/test/utils/trivial_singleton.hpp>
|
||||
#include <boost/test/utils/callback.hpp>
|
||||
|
||||
#include <boost/test/detail/suppress_warnings.hpp>
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace unit_test {
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** unit_test_monitor ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
class BOOST_TEST_DECL unit_test_monitor_t : public singleton<unit_test_monitor_t>, public execution_monitor {
|
||||
public:
|
||||
enum error_level {
|
||||
test_fail = 1,
|
||||
test_ok = 0,
|
||||
constructor_error = -1,
|
||||
unexpected_exception = -2,
|
||||
os_exception = -3,
|
||||
os_timeout = -4,
|
||||
fatal_error = -5, // includes both system and user
|
||||
destructor_error = -6
|
||||
};
|
||||
|
||||
static bool is_critical_error( error_level e ) { return e <= fatal_error; }
|
||||
|
||||
// monitor method
|
||||
error_level execute_and_translate( test_case const& );
|
||||
|
||||
private:
|
||||
BOOST_TEST_SINGLETON_CONS( unit_test_monitor_t );
|
||||
};
|
||||
|
||||
BOOST_TEST_SINGLETON_INST( unit_test_monitor )
|
||||
|
||||
} // namespace unit_test
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
#include <boost/test/detail/enable_warnings.hpp>
|
||||
|
||||
#endif // BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
|
Loading…
Add table
Add a link
Reference in a new issue