fhicl_key_t.cc
Go to the documentation of this file.
1 #define BOOST_TEST_MODULE (fhicl_key test)
3 #include "boost/test/unit_test.hpp"
4 
5 #include <string>
6 
7 using namespace std::string_literals;
9 
10 BOOST_AUTO_TEST_SUITE(fhicl_key_t)
11 
13 {
14  BOOST_TEST(fhicl_key("a") == "a"s);
15  BOOST_TEST(fhicl_key("b"s) == "b"s);
16 }
17 
18 BOOST_AUTO_TEST_CASE(multiple_args)
19 {
20  BOOST_TEST(fhicl_key("a", "b") == "a.b"s);
21  BOOST_TEST(fhicl_key("a", "b", "c") == "a.b.c"s);
22  auto const& stem = fhicl_key("a", "b");
23  BOOST_TEST(fhicl_key(stem, "c") == "a.b.c"s);
24  BOOST_TEST(fhicl_key("", "a") == "a"s);
25 }
26 
27 BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(one_arg)
Definition: fhicl_key_t.cc:12
std::enable_if_t< std::is_convertible_v< T, std::string >, std::string > fhicl_key(T const &name)
Definition: fhicl_key.h:12
static QCString * s
Definition: config.cpp:1042