]> git.proxmox.com Git - ceph.git/blob - ceph/src/Beast/extras/beast/unit_test/global_suites.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / Beast / extras / beast / unit_test / global_suites.hpp
1 //
2 // Copyright (c) 2013-2017 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
8 #ifndef BEAST_UNIT_TEST_GLOBAL_SUITES_HPP
9 #define BEAST_UNIT_TEST_GLOBAL_SUITES_HPP
10
11 #include <beast/unit_test/suite_list.hpp>
12
13 namespace beast {
14 namespace unit_test {
15
16 namespace detail {
17
18 /// Holds test suites registered during static initialization.
19 inline
20 suite_list&
21 global_suites()
22 {
23 static suite_list s;
24 return s;
25 }
26
27 template<class Suite>
28 struct insert_suite
29 {
30 insert_suite(char const* name, char const* module,
31 char const* library, bool manual)
32 {
33 global_suites().insert<Suite>(
34 name, module, library, manual);
35 }
36 };
37
38 } // detail
39
40 /// Holds test suites registered during static initialization.
41 inline
42 suite_list const&
43 global_suites()
44 {
45 return detail::global_suites();
46 }
47
48 } // unit_test
49 } // beast
50
51 #endif