common dataset macros Defined when the random dataset feature is not available.
Defined when grid composition of datasets is not available.
Defined when zip composition of datasets is not available.
Defined when the initializer_list implementation is buggy, such as for VS2013.
Defines for_each_sample algorithm.
void
Action const &T &&std::false_type
void
std::size_t ...
Action const &T &&index_sequence< I... > const &
void
Action const &T &&std::true_type
std::enable_if< monomorphic::is_dataset< DataSet >::value, void >::type
DataSet const &Action const &data::size_tBOOST_TEST_DS_INFINITE_SIZE
std::enable_if<!monomorphic::is_dataset< DataSet >::value, void >::type
DataSet &&Action const &data::size_tBOOST_TEST_DS_INFINITE_SIZE
Defines monomorphic dataset based on C type arrays.
Dataset view of a C array. = 1
T
T const *
data::size_t
iterator
T const *std::size_t
array< T >true_An array dataset is a dataset.
Defines monomorphic dataset based on forward iterable sequence.
Dataset from a forward iterable container (collection) This dataset is applicable to any container implementing a forward iterator. Note that container with one element will be considered as singletons. This dataset is constructible with the boost::unit_test::data::make function. = 1
col_type::value_type
col_type::const_iterator
C const &Returns the underlying collection.
data::size_tdataset interface
iterator
C &&Constructor consumed a temporary collection or stores a reference.
collection &&Move constructor.
collection< C >true_A collection from a forward iterable container is a dataset.
Defines a lazy/delayed dataset store.
class ...
Delayed dataset. This dataset holds another dataset that is instanciated on demand. It is constructed with the data::make_delayed<dataset_t>(arg1,....) instead of the data::make. = dataset_t::arity
decltype(std::declval< dataset_t >().begin())
boost::unit_test::data::size_t
iterator
Args...
delayed_dataset &&
dataset_t &
std::unique_ptr< dataset_t >
std::size_t...
boost::unit_test::data::index_sequence< I... >
class ...
delayed_dataset< dataset_tArgs... >true_A lazy/delayed dataset is a dataset.
Forward declares monomorphic datasets interfaces.
class...
boost::unit_test::data::monomorphic::is_dataset< DataSet >Helper to check if a list of types contains a dataset.
class...
DataSet0DataSet1DataSetTT...std::integral_constant< bool, is_dataset< DataSet0 >::value||has_dataset< DataSet1, DataSetTT... >::value >
false_Helper metafunction indicating if the specified type is a dataset.
DataSet &boost::unit_test::data::monomorphic::is_dataset< DataSet >A reference to a dataset is a dataset.
DataSet &&boost::unit_test::data::monomorphic::is_dataset< DataSet >
DataSet constboost::unit_test::data::monomorphic::is_dataset< DataSet >A const dataset is a dataset.
Result of the make call. decltype(data::make(declval< DataSet >())) typedef
std::enable_if< monomorphic::is_dataset< DataSet >::value, DataSet >::type
DataSet &&std::enable_if<!is_container_forward_iterable< T >::value &&!monomorphic::is_dataset< T >::value &&!is_array< typename remove_reference< T >::type >::value, monomorphic::singleton< T > >::type
T &&std::enable_if< is_container_forward_iterable< C >::value, monomorphic::collection< C > >::type
C &&monomorphic::array< typename boost::remove_const< T >::type >
std::size_t
T(&)monomorphic::singleton< char * >char *monomorphic::singleton< char const * >char const *monomorphic::init_list< T >
std::initializer_list< T > &&std::enable_if< !monomorphic::has_dataset< T, Args... >::value, monomorphic::init_list< T >>::type
class ...
T &&Args &&...Creates a dataset from a value, a collection or an array. This function has several overloads: // returns ds if ds is already a dataset
template <typename DataSet> DataSet make(DataSet&& ds);
// creates a singleton dataset, for non forward iterable and non dataset type T
// (a C string is not considered as a sequence).
template <typename T> monomorphic::singleton<T> make(T&& v);
monomorphic::singleton<char*> make( char* str );
monomorphic::singleton<char const*> make( char const* str );
// creates a collection dataset, for forward iterable and non dataset type C
template <typename C> monomorphic::collection<C> make(C && c);
// creates an array dataset
template<typename T, std::size_t size> monomorphic::array<T> make( T (&a)[size] );
std::enable_if< monomorphic::is_dataset< dataset_t >::value, monomorphic::delayed_dataset< dataset_t, Args... >>::type
class ...
Args...Delayed dataset instanciation.
Defines generic interface for monomorphic dataset based on generator.
Generators interface. This class implements the dataset concept over a generator. Examples of generators are:
xrange_t
random_t
The generator concept is the following:
the type of the generated samples is given by field sample
the member function capacity should return the size of the collection being generated (potentially infinite)
the member function next should change the state of the generator to the next generated value
the member function reset should put the state of the object in the same state as right after its instanciation
sample const &
void
Generator &
= 1
Generator::sample
Generator
data::size_tSize of the underlying dataset.
iteratorIterator on the beginning of the dataset.
Generator &&
generated_by &&
generated_by< Generator >true_A generated dataset is a dataset.
Defines specific generators.
Keywords used in generator interfaces.
Random generator.
double
typename ds_detail::default_distribution<SampleType>::type
std::default_random_engine
Generator for the random sequences. This class implements the generator concept (see boost::unit_test::data::monomorphic::generated_by) for implementing a random number generator. SampleType
DistributionType
EngineType
data::size_t
SampleType
void
void
SeedType &&Sets the seed of the pseudo-random number engine.
distr_type &&
engine_type &&distr_type &&
monomorphic::generated_by< monomorphic::random_t<> >monomorphic::generated_by< monomorphic::random_t< SampleType > >
SampleTypeSampleTypeunspecified
Params const &Returns an infinite sequence of random numbers. The following overloads are available: auto d = random();
auto d = random(begin, end);
auto d = random(params);
The first overload uses the default distribution, which is uniform and which elements are double type (the values are in [0, 1) ).
The second overload generates numbers in the given interval. The distribution is uniform (in [begin, end) for real numbers, and in [begin, end] for integers). The type of the distribution is deduced from the type of the begin and end parameters.
The third overload generates numbers using the named parameter inside params , which are:
distribution: the distribution used. In this overload, since the type of the samples cannot be deduced, the samples are of type double and the distribution is uniform real in [0, 1).
seed: the seed for generating the values
engine: the random number generator engine
The function returns an object that implements the dataset API. This function is available only for C++11 capable compilers.
Defines range generator.
SampleType
Generator for the range sequences. This class implements the generator concept (see boost::unit_test::data::monomorphic::generated_by) for implementing a range like sequence of numbers. SampleType
data::size_t
SampleType
void
SampleType const &StepType const &data::size_t
monomorphic::generated_by< monomorphic::xrange_t< SampleType > >
Params const &monomorphic::generated_by< monomorphic::xrange_t< SampleType > >
SampleType const &enable_if_c< nfp::is_named_param_pack< Params >::value, monomorphic::generated_by< monomorphic::xrange_t< SampleType > > >::type
SampleType const &Params const &monomorphic::generated_by< monomorphic::xrange_t< SampleType > >
SampleType const &SampleType const &monomorphic::generated_by< monomorphic::xrange_t< SampleType > >
SampleType const &SampleType const &StepType const &Creates a range (sequence) dataset. The following overloads are available: auto d = xrange();
auto d = xrange(end_val);
auto d = xrange(end_val, param);
auto d = xrange(begin_val, end_val);
auto d = xrange(begin_val, end_val, step_val);
auto d = xrange(param);
begin_val indicates the start of the sequence (default to 0).
end_val is the end of the sequence. If ommited, the dataset has infinite size.
step_val is the step between two consecutive elements of the sequence, and defaults to 1.
param is the named parameters that describe the sequence. The following parameters are accepted:
begin: same meaning begin_val
end: same meaning as end_val
step: same meaning as step_val
The returned value is an object that implements the dataset API.the step size cannot be null, and it should be positive if begin_val < end_val, negative otherwise.
Defines monomorphic dataset n+m dimentional *. Samples in this dataset is grid of elements in DataSet1 and DataSet2. There will be total |DataSet1| * |DataSet2| samples.
Implements the dataset resulting from a cartesian product/grid operation on datasets. The arity of the resulting dataset is the sum of the arity of its operands. decltype(sample_merge(*std::declval< dataset1_iter >(), *std::declval< dataset2_iter >()))
auto
void
dataset1_iterDataSet2 const &
= boost::decay<DataSet1>::type::arity + boost::decay<DataSet2>::type::arity
data::size_t
iterator
DataSet1 &&DataSet2 &&Constructor.
grid &&Move constructor.
grid< DataSet1DataSet2 >true_
Result type of the grid operation on dataset. monomorphic::grid< typename DS1Gen::type, typename DS2Gen::type >
boost::lazy_enable_if_c< is_dataset< DataSet1 >::value &&is_dataset< DataSet2 >::value, result_of::grid< mpl::identity< DataSet1 >, mpl::identity< DataSet2 > >>::type
DataSet1 &&DataSet2 &&boost::lazy_enable_if_c< is_dataset< DataSet1 >::value &&!is_dataset< DataSet2 >::value, result_of::grid< mpl::identity< DataSet1 >, data::result_of::make< DataSet2 > >>::type
DataSet1 &&DataSet2 &&boost::lazy_enable_if_c<!is_dataset< DataSet1 >::value &&is_dataset< DataSet2 >::value, result_of::grid< data::result_of::make< DataSet1 >, mpl::identity< DataSet2 > >>::type
DataSet1 &&DataSet2 &&Grid operation.
Defines monomorphic dataset based on C++11 initializer_list template.
Dataset view from an initializer_list or variadic template arguments. The data should be stored in the dataset, and since the elements are passed by an std::initializer_list , it implies a copy of the elements. = 1
std::vector< T >::const_iterator
data::size_tdataset interface
iterator
std::initializer_list< T >Constructor copies content of initializer_list.
class ...
Args &&...Variadic template initialization.
boolSpecialization of init_list for type bool. std::vector< bool >::const_iterator
bool
non_proxy_iterator &
std::vector< bool >::const_iterator &&
= 1
bool
non_proxy_iterator
data::size_tdataset interface
iterator
std::initializer_list< bool > &&Constructor copies content of initializer_list.
class ...
Args &&...Variadic template initialization.
init_list< T >true_An array dataset is a dataset.
Defines dataset join operation.
join< DataSet1DataSet2 >true_
Defines a new dataset from the concatenation of two datasets. The size of the resulting dataset is the sum of the two underlying datasets. The arity of the datasets should match.
sample_t
void
dataset1_iter &&dataset2_iter &&data::size_t
= dataset1_decay::arity
typename std::conditional< std::is_reference< iter1_ret >::value &&std::is_reference< iter2_ret >::value &&std::is_same< iter1_ret, iter2_ret >::value, iter1_ret, typename std::remove_reference< iter1_ret >::type >::type
data::size_tdataset interface
iterator
DataSet1 &&DataSet2 &&Constructor.
join &&Move constructor.
Result type of the join operation on datasets. monomorphic::join< typename DataSet1Gen::type, typename DataSet2Gen::type >
boost::lazy_enable_if_c< is_dataset< DataSet1 >::value &&is_dataset< DataSet2 >::value, result_of::join< mpl::identity< DataSet1 >, mpl::identity< DataSet2 > >>::type
DataSet1 &&DataSet2 &&
boost::lazy_enable_if_c< is_dataset< DataSet1 >::value &&!is_dataset< DataSet2 >::value, result_of::join< mpl::identity< DataSet1 >, data::result_of::make< DataSet2 > >>::type
DataSet1 &&DataSet2 &&
boost::lazy_enable_if_c<!is_dataset< DataSet1 >::value &&is_dataset< DataSet2 >::value, result_of::join< data::result_of::make< DataSet1 >, mpl::identity< DataSet2 > >>::type
DataSet1 &&DataSet2 &&
Defines single element monomorphic dataset.
singleton< T >true_
Models a single element data set.
sample const &
void
singleton< T > const *
= 1
T const &Value access method.
data::size_tdataset interface
iterator
T &&Constructor.
singleton &&Move constructor.
Defines monomorphic dataset based on zipping of 2 other monomorphic datasets.
zip< DataSet1DataSet2 >true_Zipped datasets results in a dataset.
Zip datasets. A zip of two datasets is a dataset whose arity is the sum of the operand datasets arity. The size is given by the function creating the instance (see operator^ on datasets). decltype(sample_merge(*std::declval< dataset1_iter >(), *std::declval< dataset2_iter >()))
auto
void
dataset1_iterdataset2_iter
= dataset1_decay::arity + dataset2_decay::arity
data::size_t
iterator
DataSet1 &&DataSet2 &&Constructor. The datasets are moved and not copied.
zip &&Move constructor.
data::size_tHandles the sise of the resulting zipped dataset.
Result type of the zip operator. monomorphic::zip< typename DS1Gen::type, typename DS2Gen::type >
boost::lazy_enable_if_c< is_dataset< DataSet1 >::value &&is_dataset< DataSet2 >::value, result_of::zip< mpl::identity< DataSet1 >, mpl::identity< DataSet2 > >>::type
DataSet1 &&DataSet2 &&boost::lazy_enable_if_c< is_dataset< DataSet1 >::value &&!is_dataset< DataSet2 >::value, result_of::zip< mpl::identity< DataSet1 >, data::result_of::make< DataSet2 > >>::type
DataSet1 &&DataSet2 &&boost::lazy_enable_if_c<!is_dataset< DataSet1 >::value &&is_dataset< DataSet2 >::value, result_of::zip< data::result_of::make< DataSet1 >, mpl::identity< DataSet2 > >>::type
DataSet1 &&DataSet2 &&Overload operator for zip support.
simple dataset size abstraction (can be infinite)
Utility for handling the size of a datasets.
void
std::size_t
bool
safe_bool
data::size_t
data::size_tint
data::size_t
data::size_tint
data::size_t &std::size_t
data::size_t &data::size_t
data::size_t &std::size_t
data::size_t &data::size_t
std::size_t0
bool
T
booldata::size_tstd::size_t
boolstd::size_tdata::size_t
booldata::size_tdata::size_t
booldata::size_tstd::size_t
boolstd::size_tdata::size_t
booldata::size_tdata::size_t
booldata::size_tstd::size_t
boolstd::size_tdata::size_t
booldata::size_tdata::size_t
booldata::size_tstd::size_t
boolstd::size_tdata::size_t
booldata::size_tdata::size_t
booldata::size_tstd::size_t
boolstd::size_tdata::size_t
booldata::size_tdata::size_t
booldata::size_tstd::size_t
boolstd::size_tdata::size_t
booldata::size_tdata::size_t
data::size_tdata::size_tstd::size_t
data::size_tstd::size_tdata::size_t
data::size_tdata::size_tdata::size_t
data::size_tdata::size_tstd::size_t
data::size_tstd::size_tdata::size_t
data::size_tdata::size_tdata::size_t
std::basic_ostream< CharT1, Tr > &
std::basic_ostream< CharT1, Tr > &data::size_t const &
test case family based on data generator
defines portable debug interfaces Intended to standardize interface of programs with debuggers
Collection of data, which is used by debugger starter routine. longpid of a program to attach to
boolwhat to do after debugger is attached
unit_test::const_stringpath to executable for current process
unit_test::const_stringif debugger has a GUI, which display to use (on UNIX)
unit_test::const_stringpath to a uniquely named lock file, which is used to pause current application while debugger is being initialized
Signature of debugger starter routine. Takes an instance of dbg_startup_into as only argument. boost::function< void(dbg_startup_info const &)>
boolChecks if programs runs under debugger.
true if current process is under debugger. False otherwise
voidCause program to break execution in debugger at call point.
std::stringunit_test::const_stringUnique id for debugger configuration (for example, gdb) dbg_starterdbg_starter()Optional starter routine for selected configuration (use only you want to define your own configuration) Specifies which debugger to use when attaching and optionally what routine to use to start that debugger. There are many different debuggers available for different platforms. Some of them also can be used in a different setups/configuratins. For example, gdb can be used in plain text mode, inside ddd, inside (x)emacs or in a separate xterm window. Boost.Test identifies each configuration with unique string. Also different debuggers configurations require different routines which is specifically tailored to start that debugger configuration. Boost.Test comes with set of predefined configuration names and corresponding routines for these configurations:
TODO
You can use this routine to select which one of the predefined debugger configurations to use in which case you do not need to provide starter routine (the one provided by Boost.Test will be used). You can also use this routine to select your own debugger by providing unique configuration id and starter routine for this configuration.
Id of previously selected debugger configuration
boolbooltruetells what we wan to do after the debugger is attached. If true - process execution breaks in the point in invocation of this function. Otherwise execution continues, but now it is under the debugger Attaches debugger to the current process. Using currently selected debugger, this routine attempts to attach the debugger to this process.
true if debugger successfully attached. False otherwise
voidboolboolean switch unit_test::const_stringunit_test::const_string()file, where the report should be directed to Switches on/off memory leaks detection. On platforms where memory leak detection is possible inside of running application (at the moment this is only Windows family) you can switch this feature on and off using this interface. In addition you can specify the name of the file to write a report into. Otherwise the report is going to be generated in standard error stream.
voidlongSpecific memory allocation number Causes program to break execution in debugger at specific allocation point. On some platforms/memory managers (at the moment only on Windows/Visual Studio) one can tell a C Runtime to break on specific memory allocation. This can be used in combination with memory leak detection (which reports leaked memory allocation number) to locate the place where leak initiated.
user's config for Boost.Test debugging support This file is intended to be edited by end user to specify varios macros, which configure debugger interface Alterntively you can set these parameters in your own sources/makefiles
some trivial global typedefs
T
compiler log format XML format for report and log,. JUNIT format for report and log,. User specified logger. dot format for output content Indicates the output format for the loggers or the test tree printing.
= 0x01= 0x10= 0x11
unsigned long
unsigned long
const test_unit_id
const test_unit_id
const test_unit_id
const test_unit_id
const test_unit_id
Defines public interface of the Execution Monitor and related classes.
This is a trivial default constructible class. Use it to report graceful abortion of a monitored function execution. This class is used to report any kind of an failure during execution of a monitored function inside of execution_monitor. The instance of this class is thrown out of execution_monitor::execute invocation when failure is detected. Regardless of a kind of failure occurred the instance will provide a uniform way to catch and report it.One important design rationale for this class is that we should be ready to work after fatal memory corruptions or out of memory conditions. To facilitate this class never allocates any memory and assumes that strings it refers to are either some constants or live in a some kind of persistent (preallocated) memory. Simple model for the location of failure in a source code. const_stringFile name.
size_tLine number.
const_stringFunction name.
char const *0size_t0char const *0
const_stringsize_t0char const *0
error_codeerror code const_stringerror message location const &error location Constructs instance based on message, location and error code.
= 0for completeness only; never returned = 200user reported non-fatal error = 205see note (1) above = 210see note (2) above = 215only detectable on certain platforms = 220user reported fatal error = 225see note (2) above These values are sometimes used as program return codes. The particular values have been chosen to avoid conflicts with commonly used program return codes: values < 100 are often user assigned, values > 255 are sometimes used to report system errors. Gaps in values allow for orderly expansion. (1) Only uncaught C++ exceptions are treated as errors. If a function catches a C++ exception, it never reaches the execution_monitor.
The implementation decides what is a system_fatal_error and what is just a system_exception. Fatal errors are so likely to have corrupted machine state (like a stack overflow or addressing exception) that it is unreasonable to continue execution.(2) These errors include Unix signals and Windows structured exceptions. They are often initiated by hardware traps.
Function execution monitor. This class is used to uniformly detect and report an occurrence of several types of signals and exceptions, reducing various errors to a uniform execution_exception that is returned to a caller.The execution_monitor behavior can be customized through a set of public parameters (properties) associated with the execution_monitor instance. All parameters are implemented as public unit_test::readwrite_property data members of the class execution_monitor. unit_test::readwrite_property< bool >Should monitor catch system errors. The p_catch_system_errors property is a boolean flag (default value is true) specifying whether or not execution_monitor should trap system errors/system level exceptions/signals, which would cause program to crash in a regular case (without execution_monitor). Set this property to false, for example, if you wish to force coredump file creation. The Unit Test Framework provides a runtime parameter --catch_system_errors=yes to alter the behavior in monitored test cases.
unit_test::readwrite_property< bool >Should monitor try to attach debugger in case of caught system error. The p_auto_start_dbg property is a boolean flag (default value is false) specifying whether or not execution_monitor should try to attach debugger in case system error is caught.
unit_test::readwrite_property< unsigned long int >Specifies the seconds that elapse before a timer_error occurs. The p_timeout property is an integer timeout (in microseconds) for monitored function execution. Use this parameter to monitor code with possible deadlocks or infinite loops. This feature is only available for some operating systems (not yet Microsoft Windows).
unit_test::readwrite_property< bool >Should monitor use alternative stack for the signal catching. The p_use_alt_stack property is a boolean flag (default value is false) specifying whether or not execution_monitor should use an alternative stack for the sigaction based signal catching. When enabled the signals are delivered to the execution_monitor on a stack different from current execution stack, which is safer in case if it is corrupted by monitored function. For more details on alternative stack handling see appropriate manuals.
unit_test::readwrite_property< unsigned >Should monitor try to detect hardware floating point exceptions (!= 0), and which specific exception to catch. The p_detect_fp_exceptions property is a boolean flag (default value is false) specifying whether or not execution_monitor should install hardware traps for the floating point exception on platforms where it's supported.
intboost::function< int()> const &Function to monitor Execution monitor entry point for functions returning integer value. This method executes supplied function F inside a try/catch block and also may include other unspecified platform dependent error detection code.This method throws an execution_exception on an uncaught C++ exception, a hardware or software signal, trap, or other user exception.execute() doesn't consider it an error for F to return a non-zero value.
See Also:vexecute
value returned by function call F().
voidboost::function< void()> const &Function to monitor Execution monitor entry point for functions returning void. This method is semantically identical to execution_monitor::execute, but doesn't produce any result code.
See Also:execute
void
type of the exception we register a translator for
type of the translator we register for this exception
ExceptionTranslator const &translator function object with the signature void (ExceptionType const&) const_stringconst_string()tag associated with this translator boost::type< ExceptionType > *0Registers custom (user supplied) exception translator. This method template registers a translator for an exception type specified as a first template argument. For example void myExceptTr( MyException const& ex ) { /*do something with the exception here*/}
em.register_exception_translator<MyException>( myExceptTr );
The translator should be any unary function/functor object which accepts MyException const&. This can be free standing function or bound class method. The second argument is an optional string tag you can associate with this translator routine. The only reason to specify the tag is if you plan to erase the translator eventually. This can be useful in scenario when you reuse the same execution_monitor instance to monitor different routines and need to register a translator specific to the routine being monitored. While it is possible to erase the translator based on an exception type it was registered for, tag string provides simpler way of doing this.
voidconst_stringtag associated with translator you wants to erase Erases custom exception translator based on a tag. Use the same tag as the one used during translator registration
void
boost::type< ExceptionType > *0Erases custom exception translator based on an exception type. tparam ExceptionType Exception type for which you want to erase the translator
Default constructor initializes all execution monitor properties.
intboost::function< int()> const &
long const
char const *const
char const *
= 0= BOOST_FPE_OFF= BOOST_FPE_OFF= BOOST_FPE_OFF= BOOST_FPE_OFF= BOOST_FPE_OFF= BOOST_FPE_OFF= BOOST_FPE_ALL+1
unsignedunsigned
unsignedunsigned
Disables the support of the alternative stack during the compilation of the Boost.test framework. This is especially useful in case it is not possible to detect the lack of alternative stack support for your compiler (for instance, ESXi).
Defines Unit Test Framework mono-state interfaces. The framework interfaces are based on Monostate design pattern.
boolIs there any context?
const_stringGive me next frame; empty - last frame.
runtime_errorThis exception type is used to report internal Boost.Test framework errors.
const_string
int
int
runtime_errorThis exception type is used to report test module setup errors.
const_string
const_string
voidtest_unit const &
void
voidinit_unit_test_functest module initialization routine intcommand line arguments collection char *command line arguments collection This function performs initialization of the framework mono-state. It needs to be called every time before the test is started.
voidtest_unit_idINV_TEST_UNIT_IDOptional id of the test unit representing root of test tree. If absent, master test suite is used This function applies all the decorators and figures out default run status. This argument facilitates an ability of the test cases to prepare some other test units (primarily used internally for self testing).
boolThis function returns true when testing is in progress (setup is finished).
voidThis function shuts down the framework and clears up its mono-state. It needs to be at the very end of test module execution
test_suite &test_suite *0test suite to push back to the queue booltrueshould we push ts to the queue or pop leaf test suite instead Provides both read and write access to current "leaf" auto test suite during the test unit registration phase. During auto-registration phase the framework maintain a FIFO queue of test units being registered. New test units become children of the current "leaf" test suite and if this is test suite it is pushed back into queue and becomes a new leaf. When test suite registration is completed, a test suite is popped from the back of the queue. Only automatically registered test suites should be added to this queue. Master test suite is always a zero element in this queue, so if no other test suites are registered all test cases are added to master test suite. This function facilitates all three possible actions:
if no argument are provided it returns the current queue leaf test suite
if test suite is provided and no second argument are set, test suite is added to the queue
if no test suite are provided and last argument is false, the semantic of this function is similar to queue pop: last element is popped from the queue
voidtest_case *test case to register This function add new test case into the global collection of test units the framework aware of. This function also assignes unique test unit id for every test case. Later on one can use this id to locate the test case if necessary. This is the way for the framework to maintain weak references between test units.
voidtest_suite *test suite to register This function add new test suite into the global collection of test units the framework aware of. This function also assignes unique test unit id for every test suite. Later on one can use this id to locate the test case if necessary. This is the way for the framework to maintain weak references between test units.
voidtest_unit *test unit to deregister This function removes the test unit from the collection of known test units and destroys the test unit object. This function also assigns unique test unit id for every test case. Later on one can use this id to located the test case if necessary. This is the way for the framework to maintain weak references between test units.
voidAfter this call the framework can be reinitialized to perform a second test run during the same program lifetime.
voidtest_observer &test observer object to add Observer lifetime should exceed the the testing execution timeframe.
voidtest_observer &test observer object to exclude Excludes the observer object form the framework's list of test observers.
voidglobal_fixture &fixture to add Adds a new global fixture to be setup before any other tests starts and tore down after any other tests finished. Test unit fixture lifetime should exceed the testing execution timeframe.
voidglobal_fixture &fixture to remove Removes a test global fixture from the framework. Test unit fixture lifetime should exceed the testing execution timeframe
intlazy_ostream const &context frame message boolis this sticky frame or not Records context frame message. Some context frames are sticky - they can only explicitly cleared by specifying context id. Other (non sticky) context frames cleared after every assertion.
id of the newly created frame
voidint-1Erases context frame (when test exits context scope) If context_id is passed clears that specific context frame identified by this id, otherwise clears all non sticky contexts.
context_generatorProduces an instance of small "delegate" object, which facilitates access to collected context.
master_test_suite_t &There is only only master test suite per test module.
a reference the master test suite instance
test_unit const &This function provides an access to the test unit currently being executed. The difference with current_test_case is about the time between a test-suite is being set up or torn down (fixtures) and when the test-cases of that suite start. This function is only valid during test execution phase. See Also:current_test_case_id, current_test_case
test_case const &This function provides an access to the test case currently being executed. This function is only valid during test execution phase. See Also:current_test_case_id
test_unit_idThis function provides an access to an id of the test case currently being executed. This function safer than current_test_case, cause if wont throw if no test case is being executed. See Also:current_test_case
test_unit &test_unit_idid of a test unit to locate test_unit_typetype of a test unit to locate This function provides access to a test unit by id and type combination. It will throw if no test unit located.
located test unit
UnitType &
compile time type of test unit to get (test_suite or test_case)
test_unit_idid of test unit to get This function template provides access to a typed test unit by id. It will throw if you specify incorrect test unit type
voidtest_unit_idINV_TEST_UNIT_IDOptional id of the test unit or test unit itself from which the test is started. If absent, master test suite is used booltruetrue == continue test if it was already started, false == restart the test from scratch regardless Initiates test execution. This function is used to start the test execution from a specific "root" test unit. If no root provided, test is started from master test suite. This second argument facilitates an ability of the test cases to start some other test units (primarily used internally for self testing).
voidtest_unit const *booltrueInitiates test execution. Same as other overload.
voidunit_test::assertion_result
voidexecution_exception const &Reports uncaught exception to all test observers.
voidtest_unit const &Reports aborted test unit to all test observers.
voidReports aborted test module to all test observers.
Test module initialization routine signature. Different depending on whether BOOST_TEST_ALTERNATIVE_INIT_API is defined or not test_suite *(*
Contains the formatter for the Human Readable Format (HRF)
boost::unit_test::unit_test_log_formatterLog formatter for the Human Readable Format (HRF) log format.
voidstd::ostream &output stream to write a messages to counter_ttotal test case amount to be run Invoked at the beginning of test module execution.
See Also:log_finish
voidstd::ostream &output stream to write a messages into Invoked at the end of test module execution.
See Also:log_start
voidstd::ostream &output stream to write a messages into boolindicates if build info should be logged or not Invoked when Unit Test Framework build information is requested.
voidstd::ostream &output stream to write a messages into test_unit const &test unit being started Invoked when test unit starts (either test suite or test case)
See Also:test_unit_finish
voidstd::ostream &output stream to write a messages into test_unit const &test unit being finished unsigned longtime in microseconds spend executing this test unit Invoked when test unit finishes.
See Also:test_unit_start
voidstd::ostream &output stream to write a messages into test_unit const &skipped test unit const_stringInvoked if test unit skipped for any reason.
voidstd::ostream &output stream to write a messages into log_checkpoint_data const &information about the last checkpoint before the exception was triggered execution_exception const &information about the caught exception Invoked when Unit Test Framework detects uncaught exception. The framwork calls this function when an uncaught exception it detected. This call is followed by context information:
one call to entry_context_start,
as many calls to log_entry_context as there are context entries
one call to entry_context_finish
The logging of the exception information is finilized by a call to log_exception_finish.
See Also:log_exception_finish
voidstd::ostream &output stream to write a messages into Invoked when Unit Test Framework detects uncaught exception. Call to this function finishes uncaught exception report.
See Also:log_exception_start
voidstd::ostream &output stream to write a messages into log_entry_data const &log entry attributes log_entry_typeslog entry type log_entry_finish Invoked by Unit Test Framework to start new log entry. Call to this function starts new log entry. It is followed by series of log_entry_value calls and finally call to log_entry_finish. A log entry may consist of one or more values being reported. Some of these values will be plain strings, while others can be complicated expressions in a form of "lazy" expression template lazy_ostream.
See Also:log_entry_value, log_entry_finish
call to this function may happen before any call to test_unit_start or all calls to test_unit_finish as the framework might log errors raised during global initialization/shutdown.
voidstd::ostream &output stream to write a messages into. const_stringlog entry string value Invoked by Unit Test Framework to report a log entry content. This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
See Also:log_entry_start, log_entry_finish
voidstd::ostream &output stream to write a messages into lazy_ostream const &log entry "lazy" value Invoked by Unit Test Framework to report a log entry content. This is one of two overloaded methods to report log entry content. This one is used to report some complicated expression passed as an expression template lazy_ostream. In most cases default implementation provided by the framework should work as is (it just converts the lazy expression into a string.
See Also:log_entry_start, log_entry_finish
voidstd::ostream &output stream to write a messages into Invoked by Unit Test Framework to finish a log entry report.
See Also:log_entry_start, log_entry_start
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message Invoked by Unit Test Framework to start log entry context report. Unit Test Framework logs for failed assertions and uncaught exceptions context if one was defined by a test module. Context consists of multiple "scopes" identified by description messages assigned by the test module using BOOST_TEST_INFO/BOOST_TEST_CONTEXT statements.
See Also:log_entry_context, entry_context_finish
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message const_stringcontext "scope" description Invoked by Unit Test Framework to report log entry context "scope" description. Each "scope" description is reported by separate call to log_entry_context.
See Also:log_entry_start, entry_context_finish
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message Invoked by Unit Test Framework to finish log entry context report.
See Also:log_entry_start, entry_context_context
voidstd::ostream &test_unit const &Deprecated version of this interface. Deprecated
voidstd::ostream &test_unit const &Invoked when a test unit is aborted.
voidstd::ostream &test_unit const &Invoked when a test unit times-out.
voidlog_levelSets the log level of the logger/formatter. Some loggers need to manage the log level by their own. This member function let the implementation decide of that. Since Boost 1.62
log_levelReturns the log level of the logger/formatter. Since Boost 1.62
std::stringReturns a default stream for this logger. The returned string describes the stream as if it was passed from the command line "--log_sink" parameter. With that regards, stdout and stderr have special meaning indicating the standard output or error stream respectively.Since Boost 1.62
voidstd::ostream &const_stringstd::size_t
boost::unit_test::results_reporter::format
voidstd::ostream &
voidstd::ostream &
voidtest_unit const &std::ostream &
voidtest_unit const &std::ostream &
voidtest_unit const &std::ostream &
boost::unit_test::unit_test_log_formatter
voidstd::ostream &output stream to write a messages to counter_ttotal test case amount to be run Invoked at the beginning of test module execution.
See Also:log_finish
voidstd::ostream &output stream to write a messages into Invoked at the end of test module execution.
See Also:log_start
voidstd::ostream &output stream to write a messages into boolindicates if build info should be logged or not Invoked when Unit Test Framework build information is requested.
voidstd::ostream &output stream to write a messages into test_unit const &test unit being started Invoked when test unit starts (either test suite or test case)
See Also:test_unit_finish
voidstd::ostream &output stream to write a messages into test_unit const &test unit being finished unsigned longtime in microseconds spend executing this test unit Invoked when test unit finishes.
See Also:test_unit_start
voidstd::ostream &output stream to write a messages into test_unit const &skipped test unit const_stringInvoked if test unit skipped for any reason.
voidstd::ostream &output stream to write a messages into log_checkpoint_data const &information about the last checkpoint before the exception was triggered execution_exception const &information about the caught exception Invoked when Unit Test Framework detects uncaught exception. The framwork calls this function when an uncaught exception it detected. This call is followed by context information:
one call to entry_context_start,
as many calls to log_entry_context as there are context entries
one call to entry_context_finish
The logging of the exception information is finilized by a call to log_exception_finish.
See Also:log_exception_finish
voidstd::ostream &output stream to write a messages into Invoked when Unit Test Framework detects uncaught exception. Call to this function finishes uncaught exception report.
See Also:log_exception_start
voidstd::ostream &output stream to write a messages into log_entry_data const &log entry attributes log_entry_typeslog entry type log_entry_finish Invoked by Unit Test Framework to start new log entry. Call to this function starts new log entry. It is followed by series of log_entry_value calls and finally call to log_entry_finish. A log entry may consist of one or more values being reported. Some of these values will be plain strings, while others can be complicated expressions in a form of "lazy" expression template lazy_ostream.
See Also:log_entry_value, log_entry_finish
call to this function may happen before any call to test_unit_start or all calls to test_unit_finish as the framework might log errors raised during global initialization/shutdown.
voidstd::ostream &output stream to write a messages into. const_stringlog entry string value Invoked by Unit Test Framework to report a log entry content. This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
See Also:log_entry_start, log_entry_finish
voidstd::ostream &output stream to write a messages into Invoked by Unit Test Framework to finish a log entry report.
See Also:log_entry_start, log_entry_start
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message Invoked by Unit Test Framework to start log entry context report. Unit Test Framework logs for failed assertions and uncaught exceptions context if one was defined by a test module. Context consists of multiple "scopes" identified by description messages assigned by the test module using BOOST_TEST_INFO/BOOST_TEST_CONTEXT statements.
See Also:log_entry_context, entry_context_finish
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message const_stringcontext "scope" description Invoked by Unit Test Framework to report log entry context "scope" description. Each "scope" description is reported by separate call to log_entry_context.
See Also:log_entry_start, entry_context_finish
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message Invoked by Unit Test Framework to finish log entry context report.
See Also:log_entry_start, entry_context_context
voidInvoked by Unit Test Framework to report a log entry content. This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
See Also:log_entry_start, log_entry_finish
voidInvoked by Unit Test Framework to report a log entry content. This is one of two overloaded methods to report log entry content. This one is used to report some complicated expression passed as an expression template lazy_ostream. In most cases default implementation provided by the framework should work as is (it just converts the lazy expression into a string.
See Also:log_entry_start, log_entry_finish
voidstd::ostream &test_unit const &Deprecated version of this interface. Deprecated
voidstd::ostream &test_unit const &Invoked when a test unit is aborted.
voidstd::ostream &test_unit const &Invoked when a test unit times-out.
voidstd::ostream &output stream to write a messages into lazy_ostream const &log entry "lazy" value Invoked by Unit Test Framework to report a log entry content. This is one of two overloaded methods to report log entry content. This one is used to report some complicated expression passed as an expression template lazy_ostream. In most cases default implementation provided by the framework should work as is (it just converts the lazy expression into a string.
See Also:log_entry_start, log_entry_finish
voidlog_levelSets the log level of the logger/formatter. Some loggers need to manage the log level by their own. This member function let the implementation decide of that. Since Boost 1.62
log_levelReturns the log level of the logger/formatter. Since Boost 1.62
std::stringReturns a default stream for this logger. The returned string describes the stream as if it was passed from the command line "--log_sink" parameter. With that regards, stdout and stderr have special meaning indicating the standard output or error stream respectively.Since Boost 1.62
boost::unit_test::results_reporter::format
voidstd::ostream &
voidstd::ostream &
voidtest_unit const &std::ostream &
voidtest_unit const &std::ostream &
voidtest_unit const &std::ostream &
generators and helper macros for parameterized tests
unspecified
boost::function< void(ParamType)> const &const_stringconst_stringstd::size_tParamIterParamIter
unspecified
void(*)(ParamType)const_stringconst_stringstd::size_tParamIterParamIter
unspecified
void(UserTestCase::*)(ParamType)const_stringconst_stringstd::size_tboost::shared_ptr< UserTestCase > const &ParamIterParamIter
defines simple text based progress monitor
boost::unit_test::test_observerThis class implements test observer interface and updates test progress as test units finish or get aborted.
voidCalled after the framework ends executing the test cases. The call is made with a reversed priority order.
voidtest_unit const &Called before the framework starts executing a test unit.
voidtest_unit const &backward compatibility
voidtest_unit const &Called when the test timed out. This function is called to signal that a test unit (case or suite) timed out. A valid test unit is available through boost::unit_test::framework::current_test_unit
voidtest_unit const &Called when a test unit indicates a fatal error. A fatal error happens when
a strong assertion (with REQUIRE) fails, which indicates that the test case cannot continue
an unexpected exception is caught by the Boost.Test framework
voidunit_test::assertion_result
voidexecution_exception const &Called when an exception is intercepted. In case an exception is intercepted, this call happens before the call to test_unit_aborted in order to log additional data about the exception.
Defines testing result collector components. Defines classes for keeping track (test_results) and collecting (results_collector_t) the states of the test units.
boost::unit_test::test_observerCollects and combines the test results. This class collects and combines the results of the test unit during the execution of the test tree. The results_collector_t::results() function combines the test results on a subtree of the test tree.See Also:boost::unit_test::test_observer
voidcounter_ttest_unit_idCalled before the framework starts executing the test cases.
voidtest_unit const &Called before the framework starts executing a test unit.
voidtest_unit const &unsigned longCalled at each end of a test unit.
voidtest_unit const &const_string
voidtest_unit const &Called when a test unit indicates a fatal error. A fatal error happens when
a strong assertion (with REQUIRE) fails, which indicates that the test case cannot continue
an unexpected exception is caught by the Boost.Test framework
voidtest_unit const &Called when the test timed out. This function is called to signal that a test unit (case or suite) timed out. A valid test unit is available through boost::unit_test::framework::current_test_unit
voidunit_test::assertion_result
voidexecution_exception const &Called when an exception is intercepted. In case an exception is intercepted, this call happens before the call to test_unit_aborted in order to log additional data about the exception.
intThe priority indicates the order at which this observer is initialized and tore down in the UTF framework. The order is lowest to highest priority.
test_results const &test_unit_idid of a test unit Results access per test unit.
voidCalled after the framework ends executing the test cases. The call is made with a reversed priority order.
voidCalled when a critical error is detected. The critical errors are mainly the signals sent by the system and caught by the Boost.Test framework. Since the running binary may be in incoherent/instable state, the test execution is aborted and all remaining tests are discarded.may be called before test_observer::test_unit_finish()
voidtest_unit const &backward compatibility
Collection of attributes constituting test unit results. This class is a collection of attributes describing a test result.The attributes presented as public properties on an instance of the class. In addition summary conclusion methods are presented to generate simple answer to pass/fail question counter_propNumber of test suites.
counter_propNumber of successful assertions.
counter_propNumber of failing assertions.
counter_propNumber of warnings.
counter_prop
counter_propNumber of successfull test cases.
counter_propNumber of warnings in test cases.
counter_propNumber of failing test cases.
counter_propNumber of skipped test cases.
counter_propNumber of aborted test cases.
counter_propNumber of timed out test cases.
counter_propNumber of timed out test suites.
counter_propDuration of the test in microseconds.
bool_propIndicates that the test unit execution has been aborted.
bool_propIndicates that the test unit execution has been skipped.
bool_propIndicates that the test unit has timed out.
typedefcounter_t(results_collector_t)(test_results)(results_collect_helper)Type representing counter like public property.
typedefbool(results_collector_t)(test_results)(results_collect_helper)Type representing boolean like public property.
boolReturns true if test unit passed.
boolReturns true if test unit skipped. For test suites, this indicates if the test suite itself has been marked as skipped, and not if the test suite contains any skipped test.
boolReturns true if the test unit was aborted (hard failure)
intProduces result code for the test unit execution. This methhod return one of the result codes defined in boost/cstdlib.hpp
boost::exit_success on success,
boost::exit_exception_failure in case test unit was aborted for any reason (including uncaught exception)
and boost::exit_test_failure otherwise
voidtest_results const &Combines the results of the current instance with another. Only the counters are updated and the p_aborted and p_skipped are left unchanged.
voidResets the current state of the result.
defines testing result reporter interfaces This file defines interfaces that are responsible for results reporting. Interface is presented in a form of free standing function implemented in namespace result_reporter
Results report formatter interface. This is abstract interface for the report formatter used by results reporter routines. You can define a custom formatter by implementing this interface and setting the formatter using set_format function. This is usually done during test module initialization
voidstd::ostream &
voidstd::ostream &
voidtest_unit const &std::ostream &
voidtest_unit const &std::ostream &
voidtest_unit const &std::ostream &
voidreport_levelreport level Sets reporting level. There are only four possible levels for results report:
confirmation report (boost::unit_test::CONFIRMATION_REPORT). This report level only produces short confirmation message about test module pass/fail status
short report (boost::unit_test::SHORT_REPORT). This report level produces short summary report for failed/passed assertions and test units.
detailed report (boost::unit_test::DETAILED_REPORT). This report level produces detailed report per test unit for passed/failed assertions and uncaught exceptions
no report (boost::unit_test::NO_REPORT). This report level produces no results report. This is used for test modules running as part of some kind of continues integration framework
voidstd::ostream &Sets output stream for results reporting. By default std::cerr is used. Use this function to set a different stream. The framework refers to the stream by reference, so you need to make sure the stream object lifetime exceeds the testing main scope.
voidoutput_formatone of the presefined enumeration values for output formats Sets one of the predefined formats. The framework implements two results report formats:
plain human readable format (boost::unit_test::OF_CLF)
XML format (boost::unit_test::OF_XML)
voidresults_reporter::format *pointer to heap allocated instance of custom report formatter class Sets custom report formatter. The framework takes ownership of the pointer passed as an argument. So this should be a pointer to a heap allocated object
std::ostream &Access to configured results reporter stream. Use this stream to report additional information abut test module execution
voidreport_levelINV_REPORT_LEVELtest_unit_idINV_TEST_UNIT_ID
voidtest_unit_idINV_TEST_UNIT_ID
voidtest_unit_idINV_TEST_UNIT_ID
voidtest_unit_idINV_TEST_UNIT_ID
Enhanced result for test predicate that include message explaining failure.
Type used for storing the result of an assertion.
void
bool
safe_bool
bool(assertion_result)
bool
wrap_stringstream &
const_string
bool
BoolConvertable const &
voidbool
assertion_result
Bitwise comparison manipulator implementation.
Bitwise comparison manipulator This is a terminal for the expression. unit_test::lazy_ostream &unit_test::lazy_ostream &bitwise
std::ostream &std::ostream &bitwise
Lexicographic comparison manipulator implementation.
Lexicographic comparison manipulator, for containers This is a terminal that involves evaluation of the expression.
unit_test::lazy_ostream &unit_test::lazy_ostream &lexicographic
std::ostream &std::ostream &lexicographic
Per element comparison manipulator implementation.
Per element comparison manipulator, for containers This is a terminal that involves evaluation of the expression.
unit_test::lazy_ostream &unit_test::lazy_ostream &per_element
std::ostream &std::ostream &per_element
Floating point comparison tolerance manipulators. This file defines several manipulators for floating point comparison. These manipulators are intended to be used with BOOST_TEST.
unspecified
FPTunspecified
fpc::percent_tolerance_t< FPT >unspecifiedTolerance manipulatorThese functions return a manipulator that can be used in conjunction with BOOST_TEST in order to specify the tolerance with which floating point comparisons are made.
algorithms for comparing floating point values
Predicate for comparing floating point numbers. This predicate is used to compare floating point numbers. In addition the comparison produces maximum related difference, which can be used to generate detailed error message The methods for comparing floating points are detailed in the documentation. The method is chosen by the boost::math::fpc::strength given at construction.This predicate is not suitable for comparing to 0 or to infinity. bool
FPTReturns the tolerance.
fpc::strengthReturns the comparison method.
FPTReturns the failing fraction.
boolFPTfirst floating point number to be compared FPTsecond floating point number to be comparedCompares two floating point numbers a and b such that their "left" relative difference |a-b|/a and/or "right" relative difference |a-b|/b does not exceed specified relative (fraction) tolerance.
What is reported by tested_rel_diff in case of failure depends on the comparison method:
for FPC_STRONG: the max of the two fractions
for FPC_WEAK: the min of the two fractions The rationale behind is to report the tolerance to set in order to make a test pass.
ToleranceTypefpc::strengthFPC_STRONG
const bool
char
U(*)
Two
...
FPT
FPT
Predicate for comparing floating point numbers against 0. Serves the same purpose as boost::math::fpc::close_at_tolerance, but used when one of the operand is null. bool
boolFPT
FPT
tolerance_based_delegate::type< T, !is_array< T >::value &&!is_abstract_class_or_function< T >::value >Indicates if a type can be compared using a tolerance scheme. This is a metafunction that should evaluate to mpl::true_ if the type T can be compared using a tolerance based method, typically for floating point types.This metafunction can be specialized further to declare user types that are floating point (eg. boost.multiprecision).
bool
Tfalsefalse_
Ttruempl::bool_< is_floating_point< T >::value||(!std::numeric_limits< T >::is_integer &&std::numeric_limits< T >::is_specialized &&!std::numeric_limits< T >::is_exact)>"Very close" - equation 2' in docs, the default "Close enough" - equation 3' in docs. Method for comparing floating point numbers.
std::ostream &
std::ostream &percent_tolerance_t< FPT >
percent_tolerance_t< FPT >
FPT
bool
FPTFPT
output_test_stream class definition
wrapped_streamClass to be used to simplify testing of ostream-based output operations.
assertion_resultbooltrueif true, flushes the stream after the call Checks if the stream is empty.
assertion_resultstd::size_ttarget length booltrueif true, flushes the stream after the call. Set to false to call additional checks on the same content. Checks the length of the stream.
assertion_resultconst_stringthe target stream booltrueif true, flushes the stream after the call. Checks the content of the stream against a string.
assertion_resultbooltrueif true, flushes/resets the stream after the call. Checks the content of the stream against a pattern file.
voidFlushes the stream.
const_stringconst_string()indicates the name of the file for matching. If the string is empty, the standard input or output streams are used instead (depending on match_or_save) booltrueif true, the pattern file will be read, otherwise it will be written booltrueif false, opens the stream in binary mode. Otherwise the stream is opened with default flags and the carriage returns are ignored. Constructor.
std::stringReturns the string representation of the stream. May be overriden in order to mutate the string before the matching operations.
std::size_tLength of the stream.
voidSynching the stream into an internal string representation.
defines abstract interface for test observer
Generic test observer interface. This interface is used by observers in order to receive notifications from the Boost.Test framework on the current execution state.Several observers can be running at the same time, and it is not unusual to have interactions among them. The test_observer::priority member function allows the specification of a particular order among them (lowest priority executed first, except specified otherwise).
voidcounter_ttest_unit_idCalled before the framework starts executing the test cases.
voidCalled after the framework ends executing the test cases. The call is made with a reversed priority order.
voidCalled when a critical error is detected. The critical errors are mainly the signals sent by the system and caught by the Boost.Test framework. Since the running binary may be in incoherent/instable state, the test execution is aborted and all remaining tests are discarded.may be called before test_observer::test_unit_finish()
voidtest_unit const &Called before the framework starts executing a test unit.
voidtest_unit const &unsigned longCalled at each end of a test unit.
voidtest_unit const &const_string
voidtest_unit const &backward compatibility
voidtest_unit const &Called when the test timed out. This function is called to signal that a test unit (case or suite) timed out. A valid test unit is available through boost::unit_test::framework::current_test_unit
voidtest_unit const &Called when a test unit indicates a fatal error. A fatal error happens when
a strong assertion (with REQUIRE) fails, which indicates that the test case cannot continue
an unexpected exception is caught by the Boost.Test framework
voidunit_test::assertion_result
voidexecution_exception const &Called when an exception is intercepted. In case an exception is intercepted, this call happens before the call to test_unit_aborted in order to log additional data about the exception.
intThe priority indicates the order at which this observer is initialized and tore down in the UTF framework. The order is lowest to highest priority.
Defines test_unit, test_case, test_suite and master_test_suite_t.
boost::unit_test::test_suiteint
char **
test_unit_type consttype for this test unit
const_string const"case"/"suite"/"module"
const_string const
std::size_t const
id_tunique id for this test unit
parent_id_tparent test suite id
label_list_tlist of labels associated with this test unit
id_list_tlist of test units this one depends on
precond_list_tuser supplied preconditions for this test unit;
readwrite_property< std::string >name for this test unit
readwrite_property< std::string >description for this test unit
readwrite_property< unsigned >timeout for the test unit execution in seconds
readwrite_property< counter_t >number of expected failures in this test unit
readwrite_property< run_status >run status obtained by this unit during setup phase
readwrite_property< run_status >run status assigned to this unit before execution phase after applying all filters
readwrite_property< counter_t >rank of this test unit amoung siblings of the same parent
readwrite_property< decor_list_t >automatically assigned decorators; execution is delayed till framework::finalize_setup_phase function
readwrite_property< fixture_list_t >fixtures associated with this test unit
const master_test_suite_t &
master_test_suite_t &master_test_suite_t const &
= TUT_SUITE
= TUT_ANY
std::vector< test_unit_id >
std::vector< test_unit_fixture_ptr >
std::vector< decorator::base_ptr >
boost::function< test_tools::assertion_result(test_unit_id)>
voidtest_unit *counter_t0unsigned0Adds a test unit to a test suite. It is possible to specify the timeout and the expected failures.
voidtest_unit_generator const &unsigned0This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
voidtest_unit_generator const &decorator::collector_t &This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
voidboost::shared_ptr< test_unit_generator >decorator::collector_t &This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
voidtest_unit_idRemoves a test from the test suite.
voidGenerates all the delayed test_units from the generators.
voidCheck for duplicates name in test cases. Raises a setup_error if there are duplicates
test_unit_idconst_string
std::size_t
typedeftest_unit_id(framework::state)
typedeftest_unit_id(test_suite)
typedefid_list(test_unit)
typedefstd::vector< std::string >(test_unit)
typedefstd::vector< precondition_t >(test_unit)
voidtest_unit *
voidprecondition_t const &
test_tools::assertion_result
voidconst_string
boolconst_string
voidcounter_t
bool
std::string
boost::unit_test::test_unit= TUT_CASE
= TUT_ANY
std::vector< test_unit_id >
std::vector< test_unit_fixture_ptr >
std::vector< decorator::base_ptr >
boost::function< test_tools::assertion_result(test_unit_id)>
test_func
test_unit_type consttype for this test unit
const_string const"case"/"suite"/"module"
const_string const
std::size_t const
id_tunique id for this test unit
parent_id_tparent test suite id
label_list_tlist of labels associated with this test unit
id_list_tlist of test units this one depends on
precond_list_tuser supplied preconditions for this test unit;
readwrite_property< std::string >name for this test unit
readwrite_property< std::string >description for this test unit
readwrite_property< unsigned >timeout for the test unit execution in seconds
readwrite_property< counter_t >number of expected failures in this test unit
readwrite_property< run_status >run status obtained by this unit during setup phase
readwrite_property< run_status >run status assigned to this unit before execution phase after applying all filters
readwrite_property< counter_t >rank of this test unit amoung siblings of the same parent
readwrite_property< decor_list_t >automatically assigned decorators; execution is delayed till framework::finalize_setup_phase function
readwrite_property< fixture_list_t >fixtures associated with this test unit
typedefboost::function< void()>(test_case)
typedeftest_unit_id(framework::state)
typedeftest_unit_id(test_suite)
typedefid_list(test_unit)
typedefstd::vector< std::string >(test_unit)
typedefstd::vector< precondition_t >(test_unit)
voidtest_unit *
voidprecondition_t const &
test_tools::assertion_result
voidconst_string
boolconst_string
voidcounter_t
bool
std::string
const_stringboost::function< void()> const &
const_stringconst_stringstd::size_tboost::function< void()> const &
boost::unit_test::test_unitClass representing test suites. = TUT_SUITE
= TUT_ANY
std::vector< test_unit_id >
std::vector< test_unit_fixture_ptr >
std::vector< decorator::base_ptr >
boost::function< test_tools::assertion_result(test_unit_id)>
voidtest_unit *counter_t0unsigned0Adds a test unit to a test suite. It is possible to specify the timeout and the expected failures.
voidtest_unit_generator const &unsigned0This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
voidtest_unit_generator const &decorator::collector_t &This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
voidboost::shared_ptr< test_unit_generator >decorator::collector_t &This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
voidtest_unit_idRemoves a test from the test suite.
voidGenerates all the delayed test_units from the generators.
voidCheck for duplicates name in test cases. Raises a setup_error if there are duplicates
test_unit_idconst_string
std::size_t
typedeftest_unit_id(framework::state)
typedeftest_unit_id(test_suite)
typedefid_list(test_unit)
typedefstd::vector< std::string >(test_unit)
typedefstd::vector< precondition_t >(test_unit)
voidtest_unit *
voidprecondition_t const &
test_tools::assertion_result
voidconst_string
boolconst_string
voidcounter_t
bool
std::string
const_stringconst_stringstd::size_t
const_string
test_unit_type consttype for this test unit
const_string const"case"/"suite"/"module"
const_string const
std::size_t const
id_tunique id for this test unit
parent_id_tparent test suite id
label_list_tlist of labels associated with this test unit
id_list_tlist of test units this one depends on
precond_list_tuser supplied preconditions for this test unit;
readwrite_property< std::string >name for this test unit
readwrite_property< std::string >description for this test unit
readwrite_property< unsigned >timeout for the test unit execution in seconds
readwrite_property< counter_t >number of expected failures in this test unit
readwrite_property< run_status >run status obtained by this unit during setup phase
readwrite_property< run_status >run status assigned to this unit before execution phase after applying all filters
readwrite_property< counter_t >rank of this test unit amoung siblings of the same parent
readwrite_property< decor_list_t >automatically assigned decorators; execution is delayed till framework::finalize_setup_phase function
readwrite_property< fixture_list_t >fixtures associated with this test unit
= TUT_ANY
std::vector< test_unit_id >
std::vector< test_unit_fixture_ptr >
std::vector< decorator::base_ptr >
boost::function< test_tools::assertion_result(test_unit_id)>
test_unit_type consttype for this test unit
const_string const"case"/"suite"/"module"
const_string const
std::size_t const
id_tunique id for this test unit
parent_id_tparent test suite id
label_list_tlist of labels associated with this test unit
id_list_tlist of test units this one depends on
precond_list_tuser supplied preconditions for this test unit;
readwrite_property< std::string >name for this test unit
readwrite_property< std::string >description for this test unit
readwrite_property< unsigned >timeout for the test unit execution in seconds
readwrite_property< counter_t >number of expected failures in this test unit
readwrite_property< run_status >run status obtained by this unit during setup phase
readwrite_property< run_status >run status assigned to this unit before execution phase after applying all filters
readwrite_property< counter_t >rank of this test unit amoung siblings of the same parent
readwrite_property< decor_list_t >automatically assigned decorators; execution is delayed till framework::finalize_setup_phase function
readwrite_property< fixture_list_t >fixtures associated with this test unit
typedeftest_unit_id(framework::state)
typedeftest_unit_id(test_suite)
typedefid_list(test_unit)
typedefstd::vector< std::string >(test_unit)
typedefstd::vector< precondition_t >(test_unit)
voidtest_unit *
voidprecondition_t const &
test_tools::assertion_result
voidconst_string
boolconst_string
voidcounter_t
bool
std::string
const_stringconst_stringstd::size_ttest_unit_type
const_string
test_unit *
std::vector< test_unit_id >
test_case *boost::function< void()> const &const_stringconst_stringstd::size_t
test_case *
void(UserTestCase::*)()const_stringconst_stringstd::size_tboost::shared_ptr< InstanceType >
Entry point into the Unit Test Framework. This header should be the only header necessary to include to start using the framework
intinit_unit_test_funcintchar *
defines singleton class unit_test_log and all manipulators. unit_test_log has output stream like interface. It's implementation is completely hidden with pimple idiom
boost::unit_test::test_observerManages the sets of loggers, their streams and log levels. The Boost.Test framework allows for having several formatters/loggers at the same time, each of which having their own log level and output stream.This class serves the purpose of
exposing an interface to the test framework (as a boost::unit_test::test_observer)
exposing an interface to the testing tools
managing several loggers
Accesses to the functions exposed by this class are made through the singleton boost::unit_test::unit_test_log.
Users/developers willing to implement their own formatter need to:
implement a boost::unit_test::unit_test_log_formatter that will output the desired format
register the formatter during a eg. global fixture using the method set_formatter (though the framework singleton).
this observer has a higher priority than the boost::unit_test::results_collector_t. This means that the various boost::unit_test::test_results associated to each test unit may not be available at the time the test_unit_start, test_unit_finish ... are called.
See Also:
boost::unit_test::test_observer
boost::unit_test::unit_test_log_formatter
voidcounter_ttest_unit_idCalled before the framework starts executing the test cases.
voidCalled after the framework ends executing the test cases. The call is made with a reversed priority order.
voidCalled when a critical error is detected. The critical errors are mainly the signals sent by the system and caught by the Boost.Test framework. Since the running binary may be in incoherent/instable state, the test execution is aborted and all remaining tests are discarded.may be called before test_observer::test_unit_finish()
voidtest_unit const &Called before the framework starts executing a test unit.
voidtest_unit const &unsigned longCalled at each end of a test unit.
voidtest_unit const &const_string
voidtest_unit const &Called when a test unit indicates a fatal error. A fatal error happens when
a strong assertion (with REQUIRE) fails, which indicates that the test case cannot continue
an unexpected exception is caught by the Boost.Test framework
voidtest_unit const &Called when the test timed out. This function is called to signal that a test unit (case or suite) timed out. A valid test unit is available through boost::unit_test::framework::current_test_unit
voidexecution_exception const &Called when an exception is intercepted. In case an exception is intercepted, this call happens before the call to test_unit_aborted in order to log additional data about the exception.
intThe priority indicates the order at which this observer is initialized and tore down in the UTF framework. The order is lowest to highest priority.
voidstd::ostream &Sets the stream for all loggers. This will override the log sink/stream of all loggers, whether enabled or not.
voidoutput_formatstd::ostream &Sets the stream for specific logger. Has no effect if the specified format is not found
Since Boost 1.62
std::ostream *output_formatReturns a pointer to the stream associated to specific logger. Returns a null pointer if the format is not found
Since Boost 1.67
log_levellog_levelSets the threshold level for all loggers/formatters. This will override the log level of all loggers, whether enabled or not.
the minimum of the previous log level of all formatters (new in Boost 1.73)
log_leveloutput_formatlog_levelSets the threshold/log level of a specific format. Has no effect if the specified format is not found
Since Boost 1.62
the previous log level of the corresponding formatter (new in Boost 1.73)
voidoutput_formatAdd a format to the set of loggers. Adding a logger means that the specified logger is enabled. The log level is managed by the formatter itself and specifies what events are forwarded to the underlying formatter. Since Boost 1.62
voidoutput_formatSets the format of the logger. This will become the only active format of the logs.
unit_test_log_formatter *output_formatReturns the logger instance for a specific format.
Since Boost 1.62
the logger/formatter instance, or (unit_test_log_formatter*)0 if the format is not found.
voidunit_test_log_formatter *Sets the logger instance. The specified logger becomes the unique active one. The custom log formatter has the format OF_CUSTOM_LOGGER. If such a format exists already, its formatter gets replaced by the one given in argument.The log level and output stream of the new formatter are taken from the currently active logger. In case several loggers are active, the order of priority is CUSTOM, HRF, XML, and JUNIT. If (unit_test_log_formatter*)0 is given as argument, the custom logger (if any) is removed.The ownership of the pointer is transferred to the Boost.Test framework. This call is equivalent to
a call to add_formatter
a call to set_format(OF_CUSTOM_LOGGER)
a configuration of the newly added logger with a previously configured stream and log level.
voidunit_test_log_formatter *Adds a custom log formatter to the set of formatters. The specified logger is added with the format OF_CUSTOM_LOGGER, such that it can be futher selected or its stream/log level can be specified. If there is already a custom logger (with OF_CUSTOM_LOGGER), then the existing one gets replaced by the one given in argument. The provided logger is added with an enabled state. If (unit_test_log_formatter*)0 is given as argument, the custom logger (if any) is removed and no other action is performed.The ownership of the pointer is transferred to the Boost.Test framework.
Since Boost 1.62
voidconst_stringstd::size_tconst_stringconst_string()
unit_test_log_t &log::begin const &
unit_test_log_t &log::end const &
unit_test_log_t &log_level
unit_test_log_t &const_string
unit_test_log_t &lazy_ostream const &
unspecifiedlog_level
voidPrepares internal states after log levels, streams and format has been set up.
voidtest_unit const &backward compatibility
voidunit_test::assertion_result
const_string
std::size_t
const_stringstd::size_t
Defines unit test log formatter interface. You can define a class with implements this interface and use an instance of it as a Unit Test Framework log formatter
Collection of log checkpoint attributes. const_stringlog checkpoint file name
std::size_tlog checkpoint file name
std::stringlog checkpoint message
void
Collection of log entry attributes. std::stringlog entry file name
std::size_tlog entry line number
log_levellog entry level
void
Abstract Unit Test Framework log formatter interface. During the test module execution Unit Test Framework can report messages about success or failure of assertions, which test suites are being run and more (specifically which messages are reported depends on log level threshold selected by the user).All these messages constitute Unit Test Framework log. There are many ways (formats) to present these messages to the user.Boost.Test comes with three formats:
Compiler-like log format: intended for human consumption/diagnostic
XML based log format: intended for processing by automated regression test systems.
JUNIT based log format: intended for processing by automated regression test systems.
If you want to produce some other format you need to implement class with specific interface and use method unit_test_log_t::set_formatter during a test module initialization to set an active formatter. The class unit_test_log_formatter defines this interface.This interface requires you to format all possible messages being produced in the log. These includes error messages about failed assertions, messages about caught exceptions and information messages about test units being started/ended. All the methods in this interface takes a reference to standard stream as a first argument. This is where final messages needs to be directed to. Also you are given all the information necessary to produce a message.Since Boost 1.62:
Each formatter may indicate the default output stream. This is convenient for instance for streams intended for automated processing that indicate a file. See get_default_stream_description for more details.
Each formatter may manage its own log level through the getter/setter get_log_level and set_log_level .
See Also:
boost::unit_test::test_observer for an indication of the calls of the test observer interface
Information message from the framework. Information message from the user. Warning (non error) condition notification message. Non fatal error notification message. Fatal error notification message. Types of log entries (messages written into a log)
voidstd::ostream &output stream to write a messages to counter_ttotal test case amount to be run Invoked at the beginning of test module execution.
See Also:log_finish
voidstd::ostream &output stream to write a messages into Invoked at the end of test module execution.
See Also:log_start
voidstd::ostream &output stream to write a messages into booltrueindicates if build info should be logged or not Invoked when Unit Test Framework build information is requested.
voidstd::ostream &output stream to write a messages into test_unit const &test unit being started Invoked when test unit starts (either test suite or test case)
See Also:test_unit_finish
voidstd::ostream &output stream to write a messages into test_unit const &test unit being finished unsigned longtime in microseconds spend executing this test unit Invoked when test unit finishes.
See Also:test_unit_start
voidstd::ostream &output stream to write a messages into test_unit const &skipped test unit const_stringInvoked if test unit skipped for any reason.
voidstd::ostream &test_unit const &Deprecated version of this interface. Deprecated
voidstd::ostream &test_unit const &Invoked when a test unit is aborted.
voidstd::ostream &test_unit const &Invoked when a test unit times-out.
voidstd::ostream &output stream to write a messages into log_checkpoint_data const &information about the last checkpoint before the exception was triggered execution_exception const &information about the caught exception Invoked when Unit Test Framework detects uncaught exception. The framwork calls this function when an uncaught exception it detected. This call is followed by context information:
one call to entry_context_start,
as many calls to log_entry_context as there are context entries
one call to entry_context_finish
The logging of the exception information is finilized by a call to log_exception_finish.
See Also:log_exception_finish
voidstd::ostream &output stream to write a messages into Invoked when Unit Test Framework detects uncaught exception. Call to this function finishes uncaught exception report.
See Also:log_exception_start
voidstd::ostream &output stream to write a messages into log_entry_data const &log entry attributes log_entry_typeslog entry type log_entry_finish Invoked by Unit Test Framework to start new log entry. Call to this function starts new log entry. It is followed by series of log_entry_value calls and finally call to log_entry_finish. A log entry may consist of one or more values being reported. Some of these values will be plain strings, while others can be complicated expressions in a form of "lazy" expression template lazy_ostream.
See Also:log_entry_value, log_entry_finish
call to this function may happen before any call to test_unit_start or all calls to test_unit_finish as the framework might log errors raised during global initialization/shutdown.
voidstd::ostream &output stream to write a messages into. const_stringlog entry string value Invoked by Unit Test Framework to report a log entry content. This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
See Also:log_entry_start, log_entry_finish
voidstd::ostream &output stream to write a messages into lazy_ostream const &log entry "lazy" value Invoked by Unit Test Framework to report a log entry content. This is one of two overloaded methods to report log entry content. This one is used to report some complicated expression passed as an expression template lazy_ostream. In most cases default implementation provided by the framework should work as is (it just converts the lazy expression into a string.
See Also:log_entry_start, log_entry_finish
voidstd::ostream &output stream to write a messages into Invoked by Unit Test Framework to finish a log entry report.
See Also:log_entry_start, log_entry_start
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message Invoked by Unit Test Framework to start log entry context report. Unit Test Framework logs for failed assertions and uncaught exceptions context if one was defined by a test module. Context consists of multiple "scopes" identified by description messages assigned by the test module using BOOST_TEST_INFO/BOOST_TEST_CONTEXT statements.
See Also:log_entry_context, entry_context_finish
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message const_stringcontext "scope" description Invoked by Unit Test Framework to report log entry context "scope" description. Each "scope" description is reported by separate call to log_entry_context.
See Also:log_entry_start, entry_context_finish
voidstd::ostream &output stream to write a messages into log_levelentry log_level, to be used to fine tune the message Invoked by Unit Test Framework to finish log entry context report.
See Also:log_entry_start, entry_context_context
voidlog_levelSets the log level of the logger/formatter. Some loggers need to manage the log level by their own. This member function let the implementation decide of that. Since Boost 1.62
log_levelReturns the log level of the logger/formatter. Since Boost 1.62
std::stringReturns a default stream for this logger. The returned string describes the stream as if it was passed from the command line "--log_sink" parameter. With that regards, stdout and stderr have special meaning indicating the standard output or error stream respectively.Since Boost 1.62
Constructor.
Provides access to various Unit Test Framework runtime parameters. Primarily for use by the framework itself
boost::function< void()>
std::ofstream
boost::function< void()>
voidconst const_string &boost::function< void()> const &boost::function< void()>()
std::ostream &
std::ostream &std::cout
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
std::string
voidint &char **
runtime::arguments_store const &Access to arguments.
T const &
runtime::cstring
boolruntime::cstring
boolFor public access.
Addition to STL algorithms.
std::pair< InputIter1, InputIter2 >
InputIter1- first collection begin iterator InputIter1- first collection end iterator InputIter2- second collection begin iterator InputIter2- second collection end iterator this algorithm search through two collections for first mismatch position that get returned as a pair of iterators, first pointing to the mismatch position in first collection, second iterator in second one
std::pair< InputIter1, InputIter2 >
InputIter1- first collection begin iterator InputIter1- first collection end iterator InputIter2- second collection begin iterator InputIter2- second collection end iterator Predicate- predicate to be used for search this algorithm search through two collections for first mismatch position that get returned as a pair of iterators, first pointing to the mismatch position in first collection, second iterator in second one. This algorithms uses supplied predicate for collection elements comparison
ForwardIterator1
ForwardIterator1- first collection begin iterator ForwardIterator1- first collection end iterator ForwardIterator2- second collection begin iterator ForwardIterator2- second collection end iterator this algorithm search through first collection for first element that does not belong a second one
ForwardIterator1
ForwardIterator1- first collection begin iterator ForwardIterator1- first collection end iterator ForwardIterator2- second collection begin iterator ForwardIterator2- second collection end iterator Predicate- predicate to be used for search this algorithm search through first collection for first element that does not satisfy binary predicate in conjunction will any element in second collection
BidirectionalIterator1
BidirectionalIterator1- first collection begin iterator BidirectionalIterator1- first collection end iterator ForwardIterator2- second collection begin iterator ForwardIterator2- second collection end iterator this algorithm search through first collection for last element that belongs to a second one
BidirectionalIterator1
BidirectionalIterator1- first collection begin iterator BidirectionalIterator1- first collection end iterator ForwardIterator2- second collection begin iterator ForwardIterator2- second collection end iterator Predicate- predicate to be used for search this algorithm search through first collection for last element that satisfy binary predicate in conjunction will at least one element in second collection
BidirectionalIterator1
BidirectionalIterator1- first collection begin iterator BidirectionalIterator1- first collection end iterator ForwardIterator2- second collection begin iterator ForwardIterator2- second collection end iterator this algorithm search through first collection for last element that does not belong to a second one
BidirectionalIterator1
BidirectionalIterator1- first collection begin iterator BidirectionalIterator1- first collection end iterator ForwardIterator2- second collection begin iterator ForwardIterator2- second collection end iterator Predicate- predicate to be used for search this algorithm search through first collection for last element that does not satisfy binary predicate in conjunction will any element in second collection
StringClass
StringClass- string of operation ForwardIterator- iterator to the beginning of the substrings to replace ForwardIterator- iterator to the end of the substrings to replace ForwardIterator- iterator to the beginning of the substrings to replace with ForwardIterator- iterator to the end of the substrings to replace with This algorithm replaces all occurrences of a set of substrings by another substrings.
StringClass
StringClass- string to transform ForwardIterator- iterator to the beginning of the substrings to replace ForwardIterator- iterator to the end of the substrings to replace ForwardIterator- iterator to the beginning of the substrings to replace with ForwardIterator- iterator to the end of the substrings to replace withThis algorithm replaces all occurrences of a string with basic wildcards with another (optionally containing wildcards as well).
The wildcard is the symbol '*'. Only a unique wildcard per string is supported. The replacement string may also contain a wildcard, in which case it is considered as a placeholder to the content of the wildcard in the source string. Example:
In order to replace the occurrences of 'time="some-variable-value"' to a constant string, one may use 'time="*"' as the string to search for, and 'time="0.0"' as the replacement string.
In order to replace the occurrences of 'file.cpp(XX)' per 'file.cpp:XX', where XX is a variable to keep, on may use 'file.cpp(*)' as the string to search for, and 'file.cpp:*' as the replacement string.
Defines the is_forward_iterable collection type trait.
boolis_forward_iterable<T>::value
Helper structure for accessing the content of a container or an array.
std::size_t
T [N]trueboost::add_const< T >::type
boost::add_pointer< T_const >::type
T
const_iteratorT_const(&)
const_iteratorT_const(&)
std::size_tT_const(&)
Ttruestd::iterator_traits< const_iterator >::value_type
decltype(boost::declval< typename boost::add_const< typename boost::remove_reference< T >::type >::type >().begin()) typedef
(is_forward_iterable< T >::value)
const_iteratorT const &
const_iteratorT const &
std::size_tT const &
std::size_tT const &std::true_type
std::size_tT const &std::false_type
Indicates that a specific type implements the forward iterable concept. = is_fwd_it_t::value
std::remove_reference< T >::type
unspecified
mpl::bool_< is_fwd_it_t::value >
Indicates that a specific type implements the forward iterable concept. = is_fwd_it_t::value
std::remove_reference< T >::type
unspecified
mpl::bool_< is_fwd_it_t::value >
is_same< NP::id, Keyword::id >has_param<Params,Keyword>::value is true if Params has parameter corresponding to the Keyword
named_parameter_combine< NPRest >Keywordmpl::or_< is_same< NP::id, Keyword::id >::type, has_param< Rest, Keyword >::type >
false_is_named_param_pack<T>::value is true if T is parameters pack
named_parameter< Tunique_idRefType >true_
named_parameter_combine< NPRest >true_
boolfalse
unique_id
named_parameter< T const, unique_id >
T const &
named_parameter< T, unique_id >
T &
named_parameter< char const *, unique_id, char const * >char const *
T
RefType
unique_id
ref_typekeyword< unique_id, true >
ref_typekeyword< unique_id, false >
nil
keyword< UnknownId, false >
boolkeyword< unique_id, false >
bool
keyword< UnknownId, false >
voidkeyword< unique_id, false >
void
keyword< UnknownId, false >
void
Visitor &
named_parameter_combine< NP, named_parameter< T, unique_id, RefType > >NP const &
ref_type
named_parameter const &
nil
RestNP::ref_type
named_parameter_combine< NP, Rest >
res_typekeyword< typename NP::id, true >
res_typekeyword< typename NP::id, false >
boolkeyword< typename NP::id, false >
voidkeyword< typename NP::id, false >
void
Visitor &
named_parameter_combine< NP, named_parameter_combine< NP, Rest > >NP const &
NP const &Rest const &
T const &
T
nil
Arg1 const &
nil
Arg1 const &Arg2 const &
nil
Arg1 const &Arg2 const &Arg3 const &
void
Visitor &
nil &
void
mpl::if_< is_same< NP::id, Keyword::id >::type, remove_cv< NP::data_type >::type, DefaultType >param_type<Params,Keyword,Default>::type is the type of the parameter corresponding to the Keyword (if parameter is present) or Default
named_parameter_combine< NPRest >KeywordDefaultTypempl::if_< is_same< NP::id, Keyword::id >::type, remove_cv< NP::data_type >::type, param_type< Rest, Keyword, DefaultType >::type >
bool
boost::nfp::keyword< unique_id, required >
named_parameter< T const, unique_id >T const &
named_parameter< T, unique_id >T &
unique_id
bool
boolunique_idrequiredboost::nfp::keyword< unique_id, required >boost::nfp::named_parameter< bool, unique_id, bool >unique_id
bool
bool
named_parameter< bool, unique_id, bool >
ref_typekeyword< unique_id, true >
ref_typekeyword< unique_id, false >
nilkeyword< UnknownId, false >
boolkeyword< unique_id, false >
boolkeyword< UnknownId, false >
voidkeyword< unique_id, false >
voidkeyword< UnknownId, false >
voidVisitor &
named_parameter_combine< NP, named_parameter< bool, unique_id, bool > >NP const &
named_parameter< char, struct no_params_type_t, char >
enable_if_c<!has_param< Params, Keyword >::value, void >::type
T &Params const &Keyword
enable_if_c< has_param< Params, Keyword >::value, void >::type
T &Params const &Keyword
T
Params const &KeywordT
enable_if_c<!has_param< Params, keyword< typename NP::id > >::value, named_parameter_combine< NP, Params > >::type
Params const &NP const &
enable_if_c< has_param< Params, keyword< typename NP::id > >::value, Params >::type
Params const &NP const &