2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/beast
10 #ifndef BOOST_BEAST_UNIT_TEST_SUITE_INFO_HPP
11 #define BOOST_BEAST_UNIT_TEST_SUITE_INFO_HPP
24 /** Associates a unit test type with metadata. */
27 using run_type = std::function<void(runner&)>;
42 : name_(std::move(name))
43 , module_(std::move(module))
44 , library_(std::move(library))
46 , run_(std::move(run))
68 /// Returns `true` if this suite only runs manually.
75 /// Return the canonical suite name as a string.
79 return library_ + "." + module_ + "." + name_;
82 /// Run a new instance of the associated test suite.
91 operator<(suite_info const& lhs, suite_info const& rhs)
94 std::tie(lhs.library_, lhs.module_, lhs.name_) <
95 std::tie(rhs.library_, rhs.module_, rhs.name_);
99 //------------------------------------------------------------------------------
101 /// Convenience for producing suite_info for a given test type.
102 template<class Suite>