1 #define BOOST_TEST_MODULE (Bounded sequences with defaults) 3 #include "boost/test/unit_test.hpp" 13 using namespace fhicl;
15 using namespace string_literals;
33 return validated_config;
37 BOOST_AUTO_TEST_SUITE(bounded_sequence_with_defaults)
42 auto const& validated = validate<ArrayConfig>(good);
43 BOOST_TEST(validated().composers(0) ==
"Mahler"s);
44 BOOST_TEST(validated().composers(1) ==
"Elgar"s);
50 auto const& validated = validate<TupleConfig>(good);
51 BOOST_TEST(validated().ages.get<0>() ==
"David"s);
52 BOOST_TEST(validated().ages.get<1>() == 9u);
57 string const bad{
"composers: [Beethoven]"};
67 string const bad{
"ages: [Jenny]"};
68 BOOST_REQUIRE_THROW(validate<TupleConfig>(
bad), detail::validationException);
71 BOOST_AUTO_TEST_SUITE_END()
static ParameterSet make(intermediate_table const &tbl)
ChannelGroupService::Name Name
def validate(nxgraph, desc)
cet::coded_exception< error, detail::translate > exception
BOOST_AUTO_TEST_CASE(GoodArray)