Go to the source code of this file.
BOOST_AUTO_TEST_CASE |
( |
GoodTuple1 |
| ) |
|
Definition at line 53 of file nestedValidation_03_t.cc.
55 string const good{
"nested: { pars: [[A, [B]], [X, [Y, Z]]] }"s};
56 std::vector<std::string>
const ref1{
"B"s};
57 std::vector<std::string>
const ref2{
"Y"s,
"Z"s};
58 std::vector<std::string>
const ref3{
"U"s,
"V"s,
"W"s};
60 auto const& pars = validatedConfig().nested().pars();
62 BOOST_TEST(std::get<0>(pars[0]) ==
"A"s);
63 BOOST_TEST(std::get<1>(pars[0]) == ref1);
64 BOOST_TEST(std::get<0>(pars[1]) ==
"X"s);
65 BOOST_TEST(std::get<1>(pars[1]) == ref2);
66 auto const& defaultedPars = validatedConfig().nestedWithDef().pars();
68 BOOST_TEST(std::get<0>(defaultedPars[0]) ==
"T"s);
69 BOOST_TEST(std::get<1>(defaultedPars[0]) == ref3);
fhicl::Table< Config > validateConfig(std::string const &configStr)
BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
BOOST_AUTO_TEST_CASE |
( |
GoodTuple2 |
| ) |
|
Definition at line 72 of file nestedValidation_03_t.cc.
74 string const good{
"nested: { pars: [[A, [B]], [X, [Y, Z]]] }\n"s +
75 "nestedWithDef: { pars: [[M, [N, O, P, Q]], [R, [S]]] }"s};
76 std::vector<std::string>
const ref1{
"B"s};
77 std::vector<std::string>
const ref2{
"Y"s,
"Z"s};
78 std::vector<std::string>
const ref3{
"N"s,
"O"s,
"P"s,
"Q"s};
79 std::vector<std::string>
const ref4{
"S"s};
81 auto const& pars = validatedConfig().nested().pars();
83 BOOST_TEST(std::get<0>(pars[0]) ==
"A"s);
84 BOOST_TEST(std::get<1>(pars[0]) == ref1);
85 BOOST_TEST(std::get<0>(pars[1]) ==
"X"s);
86 BOOST_TEST(std::get<1>(pars[1]) == ref2);
87 auto const& defaultedPars = validatedConfig().nestedWithDef().pars();
89 BOOST_TEST(std::get<0>(defaultedPars[0]) ==
"M"s);
90 BOOST_TEST(std::get<1>(defaultedPars[0]) == ref3);
91 BOOST_TEST(std::get<0>(defaultedPars[1]) ==
"R"s);
92 BOOST_TEST(std::get<1>(defaultedPars[1]) == ref4);
fhicl::Table< Config > validateConfig(std::string const &configStr)
BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
BOOST_AUTO_TEST_CASE |
( |
BadTuple1 |
| ) |
|
Definition at line 95 of file nestedValidation_03_t.cc.
97 string const bad{
"nested: { pars: [[A], [X, [Y, Z]]] }"s};
fhicl::Table< Config > validateConfig(std::string const &configStr)
BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
BOOST_AUTO_TEST_CASE |
( |
BadTuple2 |
| ) |
|
Definition at line 102 of file nestedValidation_03_t.cc.
104 string const bad{
"nested: { pars: [[A]] }"s};
fhicl::Table< Config > validateConfig(std::string const &configStr)
BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
BOOST_AUTO_TEST_CASE |
( |
BadTuple3 |
| ) |
|
Definition at line 109 of file nestedValidation_03_t.cc.
111 string const bad{
"nested: { pars: [[A, 7]] }"s};
fhicl::Table< Config > validateConfig(std::string const &configStr)
BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
cet::coded_exception< error, detail::translate > exception
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
BOOST_AUTO_TEST_CASE |
( |
BadTuple4 |
| ) |
|
Definition at line 116 of file nestedValidation_03_t.cc.
118 string const bad{
"nested: { pars: [[A, [7]]] }\n"s +
119 "nestedWithDef: { pars: [[A]]}"s};
fhicl::Table< Config > validateConfig(std::string const &configStr)
BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.