#include "boost/test/tools/output_test_stream.hpp"
#include "boost/test/unit_test.hpp"
#include "art/Framework/Services/Registry/GlobalSignal.h"
#include <ostream>
#include <string>
Go to the source code of this file.
#define BOOST_TEST_MODULE (GlobalSignal_t) |
BOOST_AUTO_TEST_CASE |
( |
TestSignal2_t |
| ) |
|
Definition at line 48 of file GlobalSignal_t.cc.
52 boost::test_tools::output_test_stream os;
53 s.watch(testCallback<1>);
54 s.watch(testCallback<2>);
55 s.watch(testCallback<3>);
57 "2: " + test_text +
"3: " + test_text};
58 BOOST_CHECK_NO_THROW(s.invoke(os, test_text));
59 BOOST_TEST(os.is_equal(cmp_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal2a_t |
| ) |
|
Definition at line 62 of file GlobalSignal_t.cc.
66 boost::test_tools::output_test_stream os;
67 s.watch(testCallback<1>);
68 s.watch(testCallback<2>);
69 s.watch(testCallback<3>);
71 "2: " + test_text +
"1: " + test_text};
72 BOOST_CHECK_NO_THROW(s.invoke(os, test_text));
73 BOOST_TEST(os.is_equal(cmp_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal2_func_t |
| ) |
|
Definition at line 76 of file GlobalSignal_t.cc.
80 boost::test_tools::output_test_stream os;
83 BOOST_CHECK_NO_THROW(s.invoke(os, test_text));
84 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal2_cfunc_t |
| ) |
|
Definition at line 87 of file GlobalSignal_t.cc.
91 boost::test_tools::output_test_stream os;
92 CallBackClass
const cbc;
93 s.watch(&CallBackClass::cfunc, cbc);
94 BOOST_CHECK_NO_THROW(s.invoke(os, test_text));
95 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal1_t |
| ) |
|
Definition at line 98 of file GlobalSignal_t.cc.
102 boost::test_tools::output_test_stream os;
103 s.watch([&test_text](
auto&
x) { testCallback<0>(
x, test_text); });
104 BOOST_CHECK_NO_THROW(s.invoke(os));
105 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal0_t |
| ) |
|
Definition at line 108 of file GlobalSignal_t.cc.
112 boost::test_tools::output_test_stream os;
118 std::ostringstream& osr [[maybe_unused]]{os};
119 s.watch([&osr, &test_text] { testCallback<0>(osr, test_text); });
120 BOOST_CHECK_NO_THROW(s.invoke());
121 BOOST_TEST(os.is_equal(test_text));