1 //
2 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
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)
6 //
7 // Official repository: https://github.com/boostorg/beast
8 //
9 
10 #ifndef BOOST_BEAST_UNIT_TEST_GLOBAL_SUITES_HPP
11 #define BOOST_BEAST_UNIT_TEST_GLOBAL_SUITES_HPP
12 
13 #include <boost/beast/_experimental/unit_test/suite_list.hpp>
14 
15 namespace boost {
16 namespace beast {
17 namespace unit_test {
18 
19 namespace detail {
20 
21 /// Holds test suites registered during static initialization.
22 inline
23 suite_list&
global_suites()24 global_suites()
25 {
26     static suite_list s;
27     return s;
28 }
29 
30 template<class Suite>
31 struct insert_suite
32 {
insert_suiteboost::beast::unit_test::detail::insert_suite33     insert_suite(char const* name, char const* module,
34         char const* library, bool manual)
35     {
36         global_suites().insert<Suite>(
37             name, module, library, manual);
38     }
39 };
40 
41 } // detail
42 
43 /// Holds test suites registered during static initialization.
44 inline
45 suite_list const&
global_suites()46 global_suites()
47 {
48     return detail::global_suites();
49 }
50 
51 } // unit_test
52 } // beast
53 } // boost
54 
55 #endif
56