#include "boost/test/tools/output_test_stream.hpp"
#include "boost/test/unit_test.hpp"
#include "art/Framework/Services/Registry/LocalSignal.h"
#include "art/Utilities/ScheduleID.h"
#include <ostream>
#include <stdexcept>
#include <string>
Go to the source code of this file.
#define BOOST_TEST_MODULE (LocalSignal_t) |
BOOST_AUTO_TEST_CASE |
( |
TestSignal2_t |
| ) |
|
Definition at line 53 of file LocalSignal_t.cc.
55 TestSignal2
s{nSchedules};
57 boost::test_tools::output_test_stream os;
58 BOOST_CHECK_NO_THROW(
s.watch(sID, testCallback<1>));
59 BOOST_CHECK_NO_THROW(
s.watch(sID, testCallback<2>));
60 BOOST_CHECK_NO_THROW(
s.watch(sID, testCallback<3>));
62 "2: " + test_text +
"3: " + test_text};
63 BOOST_CHECK_NO_THROW(
s.invoke(sID, os, test_text));
64 BOOST_TEST(os.is_equal(cmp_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal2a_t |
| ) |
|
Definition at line 67 of file LocalSignal_t.cc.
69 TestSignal2a
s{nSchedules};
71 boost::test_tools::output_test_stream os;
72 BOOST_CHECK_NO_THROW(
s.watch(sID, testCallback<1>));
73 BOOST_CHECK_NO_THROW(
s.watch(sID, testCallback<2>));
74 BOOST_CHECK_NO_THROW(
s.watch(sID, testCallback<3>));
76 "2: " + test_text +
"1: " + test_text};
77 BOOST_CHECK_NO_THROW(
s.invoke(sID, os, test_text));
78 BOOST_TEST(os.is_equal(cmp_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal2_func_t |
| ) |
|
Definition at line 81 of file LocalSignal_t.cc.
83 TestSignal2
s{nSchedules};
85 boost::test_tools::output_test_stream os;
88 BOOST_CHECK_NO_THROW(
s.invoke(sID, os, test_text));
89 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal2_cfunc_t |
| ) |
|
Definition at line 92 of file LocalSignal_t.cc.
94 TestSignal2
s{nSchedules};
96 boost::test_tools::output_test_stream os;
97 CallBackClass
const cbc;
98 BOOST_CHECK_NO_THROW(
s.watch(sID, &CallBackClass::cfunc, cbc));
99 BOOST_CHECK_NO_THROW(
s.invoke(sID, os, test_text));
100 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal1_t |
| ) |
|
Definition at line 103 of file LocalSignal_t.cc.
105 TestSignal1
s{nSchedules};
107 boost::test_tools::output_test_stream os;
108 BOOST_CHECK_NO_THROW(
109 s.watch(sID, [&test_text](
auto&
x) { testCallback<0>(x, test_text); }));
110 BOOST_CHECK_NO_THROW(
s.invoke(sID, os));
111 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal0_t |
| ) |
|
Definition at line 114 of file LocalSignal_t.cc.
116 TestSignal0
s{nSchedules};
118 boost::test_tools::output_test_stream os;
119 BOOST_CHECK_NO_THROW(
120 s.watch(sID, [&os, &test_text] { testCallback<0>(os, test_text); }));
121 BOOST_CHECK_NO_THROW(
s.invoke(sID));
122 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal1_All_t |
| ) |
|
Definition at line 125 of file LocalSignal_t.cc.
127 TestSignal1
s{nSchedules};
129 boost::test_tools::output_test_stream os;
130 BOOST_CHECK_NO_THROW(
131 s.watchAll([&test_text](
auto&
x) { testCallback<0>(x, test_text); }));
132 BOOST_CHECK_NO_THROW(
s.invoke(sID, os));
133 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal2_All_t |
| ) |
|
Definition at line 136 of file LocalSignal_t.cc.
138 TestSignal2
s{nSchedules};
140 boost::test_tools::output_test_stream os;
141 BOOST_CHECK_NO_THROW(
s.watchAll(testCallback<0>));
142 BOOST_CHECK_NO_THROW(
s.invoke(sID, os, test_text));
143 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
TestSignal0_All_t |
| ) |
|
Definition at line 146 of file LocalSignal_t.cc.
148 TestSignal0
s{nSchedules};
150 boost::test_tools::output_test_stream os;
151 BOOST_CHECK_NO_THROW(
152 s.watchAll([&os, &test_text] { testCallback<0>(os, test_text); }));
153 BOOST_CHECK_NO_THROW(
s.invoke(sID));
154 BOOST_TEST(os.is_equal(test_text));
BOOST_AUTO_TEST_CASE |
( |
watchFail |
| ) |
|
Definition at line 157 of file LocalSignal_t.cc.
159 TestSignal0
s{nSchedules};
161 boost::test_tools::output_test_stream os;
164 [&os, &test_text] { testCallback<0>(os, test_text); })),