]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | // |
b32b8144 | 2 | // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) |
7c673cae FG |
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 | // | |
b32b8144 FG |
7 | // Official repository: https://github.com/boostorg/beast |
8 | // | |
7c673cae | 9 | |
b32b8144 FG |
10 | #ifndef BOOST_BEAST_UNIT_TEST_GLOBAL_SUITES_HPP |
11 | #define BOOST_BEAST_UNIT_TEST_GLOBAL_SUITES_HPP | |
7c673cae | 12 | |
b32b8144 | 13 | #include <boost/beast/unit_test/suite_list.hpp> |
7c673cae | 14 | |
b32b8144 | 15 | namespace boost { |
7c673cae FG |
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& | |
24 | global_suites() | |
25 | { | |
26 | static suite_list s; | |
27 | return s; | |
28 | } | |
29 | ||
30 | template<class Suite> | |
31 | struct insert_suite | |
32 | { | |
33 | 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& | |
46 | global_suites() | |
47 | { | |
48 | return detail::global_suites(); | |
49 | } | |
50 | ||
51 | } // unit_test | |
52 | } // beast | |
b32b8144 | 53 | } // boost |
7c673cae FG |
54 | |
55 | #endif |