Macros | Functions
optionalDelegatedParameter_t.cc File Reference
#include "boost/test/unit_test.hpp"
#include "FixtureBase.h"
#include "fhiclcpp/types/OptionalDelegatedParameter.h"

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   (optionalDelegatedParameter test)
 

Functions

 BOOST_AUTO_TEST_CASE (optional_delegation_check)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   (optionalDelegatedParameter test)

Definition at line 1 of file optionalDelegatedParameter_t.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( optional_delegation_check  )

Definition at line 29 of file optionalDelegatedParameter_t.cc.

30 {
32  BOOST_TEST(config().dt.get_if_present(ps));
33 
34  std::vector<int> nums;
35  BOOST_TEST(config().ds.get_if_present(nums));
36 
37  std::string greeting;
38  BOOST_TEST(config().nested().nda.get_if_present(greeting));
39  BOOST_TEST(greeting == "Hello, Billy");
40 
41  ps = ParameterSet{};
42  BOOST_TEST(not config().nested().ndt.get_if_present(ps));
43  BOOST_TEST(ps.is_empty());
44 }
std::string string
Definition: nybbler.cc:12
static Config * config
Definition: config.cpp:1054
static constexpr double ps
Definition: Units.h:99
bool is_empty() const