#include "boost/test/unit_test.hpp"
#include "canvas/Utilities/InputTag.h"
#include <set>
#include <string>
Go to the source code of this file.
#define BOOST_TEST_MODULE (InputTag_t) |
BOOST_AUTO_TEST_CASE |
( |
InputTag_default_ctor |
| ) |
|
Definition at line 10 of file InputTag_t.cc.
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
BOOST_AUTO_TEST_CASE |
( |
InputTag_from_string |
| ) |
|
Definition at line 19 of file InputTag_t.cc.
24 BOOST_TEST(
t.label() == mylabel);
25 BOOST_TEST(
t.instance() ==
empty);
26 BOOST_TEST(
t.process() ==
empty);
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
BOOST_AUTO_TEST_CASE |
( |
InputTag_from_two_strings |
| ) |
|
Definition at line 29 of file InputTag_t.cc.
35 BOOST_TEST(
t.label() == mylabel);
36 BOOST_TEST(
t.instance() == myinstance);
37 BOOST_TEST(
t.process() ==
empty);
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
BOOST_AUTO_TEST_CASE |
( |
InputTag_from_three_strings |
| ) |
|
Definition at line 40 of file InputTag_t.cc.
46 BOOST_TEST(
t.label() == mylabel);
47 BOOST_TEST(
t.instance() == myinstance);
48 BOOST_TEST(
t.process() == myprocess);
BOOST_AUTO_TEST_CASE |
( |
InputTag_from_one_cstring |
| ) |
|
Definition at line 51 of file InputTag_t.cc.
53 const char* mylabel =
"mylabel";
57 BOOST_TEST(
t.instance() ==
empty);
58 BOOST_TEST(
t.process() ==
empty);
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
BOOST_AUTO_TEST_CASE |
( |
InputTag_convert_from_string |
| ) |
|
Definition at line 67 of file InputTag_t.cc.
71 BOOST_TEST(mylabel == result);
BOOST_AUTO_TEST_CASE |
( |
InputTag_convert_from_cstring |
| ) |
|
Definition at line 74 of file InputTag_t.cc.
76 const char* mylabel =
"alabel";
BOOST_AUTO_TEST_CASE |
( |
InputTagEmptyFields_1 |
| ) |
|
BOOST_AUTO_TEST_CASE |
( |
InputTagEmptyFields_2 |
| ) |
|
BOOST_AUTO_TEST_CASE |
( |
InputTagEmptyFields_3 |
| ) |
|
BOOST_AUTO_TEST_CASE |
( |
InputTagEmptyFields_4 |
| ) |
|
BOOST_AUTO_TEST_CASE |
( |
InputTag_comparison |
| ) |
|
Definition at line 113 of file InputTag_t.cc.
121 BOOST_TEST(
a1 ==
a2);
122 BOOST_TEST(
a1 ==
a3);
123 BOOST_TEST(
a2 ==
a3);
124 BOOST_TEST(
a3 ==
a1);
125 BOOST_TEST(
a1 != b1);
126 BOOST_TEST(
a1 != b2);
127 BOOST_TEST(
a1 != b3);
128 BOOST_TEST(b1 != b2);
129 BOOST_TEST(b1 != b3);
130 BOOST_TEST(b2 != b3);
BOOST_AUTO_TEST_CASE |
( |
InputTag_set |
| ) |
|
Definition at line 133 of file InputTag_t.cc.
135 std::set<art::InputTag>
test;
136 test.emplace(
"c",
"i");
140 std::vector<art::InputTag>
const ref{
"a::",
"b",
"c:i:"};
141 BOOST_TEST(test == ref, boost::test_tools::per_element{});
144 BOOST_TEST(test.emplace(
"c:i").second ==
false);
yes & test(std::ostream &)