test_result
instances represent results of a compile-time tests at runtime. Instances are immutable, thus their state can not be changed after construction.
#include <metatest/test_result.hpp>
test_result::test_result(
const std::string& name_,
const location& location_,
bool success_,
const std::string& reason_
)
Creates a new instance with the specified properties.
None of the methods throws an exception.
bool test_result::has_name() const
Whether the result object has a name.
const std::string& test_result::get_name() const
Name of the current test.
const location& test_result::get_location() const
Location of the test body within the source.
bool test_result::success() const
Success/fail status.
bool test_result::has_reason() const
Whether the result object has a description.
const std::string& test_result::get_reason() const
Description of the test result.
template <class Pred>
static test_result test_result::build(
const location& location_,
const std::string& name_ = std::string()
)
Builds a test_result
instance by evaluating the predicate.
std::ostream& operator<<(std::ostream& o_, const test_result& result_);
Pretty-prints the test result to the stream.
Copyright Endre Tamas SAJO (baja at inf dot elte dot hu), Abel Sinkovics (abel at elte dot hu), 2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt