Macros | Functions
keys_to_ignore_t.cc File Reference
#include "boost/test/unit_test.hpp"
#include "fhiclcpp/ParameterSet.h"
#include "fhiclcpp/types/KeysToIgnore.h"
#include "fhiclcpp/types/Table.h"

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   (keys_to_ignore)
 

Functions

 BOOST_AUTO_TEST_CASE (simple_case)
 
 BOOST_AUTO_TEST_CASE (simple_case_2)
 
 BOOST_AUTO_TEST_CASE (template_test_1)
 
 BOOST_AUTO_TEST_CASE (template_test_2)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   (keys_to_ignore)

Definition at line 7 of file keys_to_ignore_t.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( simple_case  )

Definition at line 42 of file keys_to_ignore_t.cc.

43 {
44  std::string const config{"testing: \"it works\""};
45  auto const pset = ParameterSet::make(config);
47  test.print_allowed_configuration(std::cout);
48 }
std::string string
Definition: nybbler.cc:12
static Config * config
Definition: config.cpp:1054
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
BOOST_AUTO_TEST_CASE ( simple_case_2  )

Definition at line 50 of file keys_to_ignore_t.cc.

51 {
52  std::string const config{"testing: { if: \"it works\" }"};
53  auto const pset = ParameterSet::make(config);
54  auto test = Table<Config>{pset, Config::KeysToIgnore{}()};
55  test.print_allowed_configuration(std::cout);
56 }
std::string string
Definition: nybbler.cc:12
static Config * config
Definition: config.cpp:1054
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
BOOST_AUTO_TEST_CASE ( template_test_1  )

Definition at line 58 of file keys_to_ignore_t.cc.

59 {
60  auto const& ref = Config::KeysToIgnore{}();
62  BOOST_TEST(test == ref);
63 }
BOOST_AUTO_TEST_CASE ( template_test_2  )

Definition at line 65 of file keys_to_ignore_t.cc.

66 {
67  auto const& ref = {"a", "testing", "z"};
68  auto const& test =
70  BOOST_TEST(test == ref, boost::test_tools::per_element{});
71 }