Macros | Functions
tupleAs_t.cc File Reference
#include "boost/test/unit_test.hpp"
#include "FixtureBase.h"
#include "fhiclcpp/types/OptionalTupleAs.h"
#include "fhiclcpp/types/Sequence.h"
#include "fhiclcpp/types/TupleAs.h"
#include <string>
#include <vector>

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   (tupleAs test)
 

Functions

 BOOST_AUTO_TEST_CASE (tupleAs_simple)
 
 BOOST_AUTO_TEST_CASE (tupleAs_default_value)
 
 BOOST_AUTO_TEST_CASE (tupleAs_toVector)
 
 BOOST_AUTO_TEST_CASE (tupleAs_inSequence)
 
 BOOST_AUTO_TEST_CASE (tupleAs_inSequence_2)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   (tupleAs test)

Definition at line 7 of file tupleAs_t.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( tupleAs_simple  )

Definition at line 90 of file tupleAs_t.cc.

91 {
92  ThreeNumbers const& tn1 = config().tn1();
93  BOOST_TEST(tn1.i_ == 1);
94  BOOST_TEST(tn1.j_ == 9);
95  BOOST_TEST(tn1.k_ == 17);
96 }
static Config * config
Definition: config.cpp:1054
BOOST_AUTO_TEST_CASE ( tupleAs_default_value  )

Definition at line 98 of file tupleAs_t.cc.

99 {
100  ThreeNumbers const& tn2 = config().tn2();
101  BOOST_TEST(tn2.i_ == 1);
102  BOOST_TEST(tn2.j_ == 3);
103  BOOST_TEST(tn2.k_ == 5);
104 }
static Config * config
Definition: config.cpp:1054
BOOST_AUTO_TEST_CASE ( tupleAs_toVector  )

Definition at line 106 of file tupleAs_t.cc.

107 {
108  ToVector const& v = config().toVector();
109  auto const ref = {5, 10, 15, 20};
110  BOOST_TEST(v.value_ == ref, boost::test_tools::per_element{});
111 }
static Config * config
Definition: config.cpp:1054
BOOST_AUTO_TEST_CASE ( tupleAs_inSequence  )

Definition at line 113 of file tupleAs_t.cc.

114 {
115  auto const& people = config().people();
116  auto const ref = {Person{"Alice", 1},
117  Person{"Bob", 2},
118  Person{"Charlie", 3},
119  Person{"Danielle", 4},
120  Person{"Edgar", 5}};
121  BOOST_TEST(people == ref, boost::test_tools::per_element{});
122 }
static Config * config
Definition: config.cpp:1054
BOOST_AUTO_TEST_CASE ( tupleAs_inSequence_2  )

Definition at line 124 of file tupleAs_t.cc.

125 {
126  auto const& people = config().kids();
127  auto const ref = {Person{"Billy", 10}, Person{"Susie", 14}};
128  BOOST_TEST(people == ref, boost::test_tools::per_element{});
129 }
static Config * config
Definition: config.cpp:1054