Namespaces | Macros | Functions
tableAs_t.cc File Reference
#include "boost/test/unit_test.hpp"
#include "FixtureBase.h"
#include "fhiclcpp/types/OptionalTableAs.h"
#include "fhiclcpp/types/Sequence.h"
#include "fhiclcpp/types/Table.h"
#include "fhiclcpp/types/TableAs.h"
#include <string>

Go to the source code of this file.

Namespaces

 address
 

Macros

#define BOOST_TEST_MODULE   (tableAs test)
 

Functions

 BOOST_AUTO_TEST_CASE (tableAs_simple)
 
 BOOST_AUTO_TEST_CASE (tableAs_default_simple)
 
 BOOST_AUTO_TEST_CASE (tableAs_inSequence)
 
 BOOST_AUTO_TEST_CASE (optionalTableAs)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   (tableAs test)

Definition at line 7 of file tableAs_t.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( tableAs_simple  )

Definition at line 112 of file tableAs_t.cc.

113 {
114  auto const mother = config().mother();
115  auto const ref = Person{"Angela", 32};
116  BOOST_TEST(mother == ref);
117 }
static Config * config
Definition: config.cpp:1054
BOOST_AUTO_TEST_CASE ( tableAs_default_simple  )

Definition at line 119 of file tableAs_t.cc.

120 {
121  auto const father = config().father();
122  auto const ref = Person{"John", 30};
123  BOOST_TEST(father == ref);
124 }
static Config * config
Definition: config.cpp:1054
BOOST_AUTO_TEST_CASE ( tableAs_inSequence  )

Definition at line 126 of file tableAs_t.cc.

127 {
128  auto const kids = config().kids();
129  auto const ref = {Person{"Alice", 1},
130  Person{"Bob", 2},
131  Person{"Charlie", 3},
132  Person{"Danielle", 4},
133  Person{"Edgar", 5}};
134  BOOST_TEST(kids == ref, boost::test_tools::per_element{});
135 }
static Config * config
Definition: config.cpp:1054
BOOST_AUTO_TEST_CASE ( optionalTableAs  )

Definition at line 137 of file tableAs_t.cc.

138 {
139  ContactInfo info;
140  BOOST_TEST(config().contact_info(info));
141  auto const ref = ContactInfo{"123 S. 45th Ave.", "(123) 456-7890"};
142  BOOST_TEST(info == ref);
143 }
static Config * config
Definition: config.cpp:1054