#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.
#define BOOST_TEST_MODULE (tupleAs test) |
BOOST_AUTO_TEST_CASE |
( |
tupleAs_simple |
| ) |
|
Definition at line 90 of file tupleAs_t.cc.
92 ThreeNumbers
const& tn1 =
config().tn1();
93 BOOST_TEST(tn1.i_ == 1);
94 BOOST_TEST(tn1.j_ == 9);
95 BOOST_TEST(tn1.k_ == 17);
BOOST_AUTO_TEST_CASE |
( |
tupleAs_default_value |
| ) |
|
Definition at line 98 of file tupleAs_t.cc.
100 ThreeNumbers
const& tn2 =
config().tn2();
101 BOOST_TEST(tn2.i_ == 1);
102 BOOST_TEST(tn2.j_ == 3);
103 BOOST_TEST(tn2.k_ == 5);
BOOST_AUTO_TEST_CASE |
( |
tupleAs_toVector |
| ) |
|
Definition at line 106 of file tupleAs_t.cc.
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{});
BOOST_AUTO_TEST_CASE |
( |
tupleAs_inSequence |
| ) |
|
Definition at line 113 of file tupleAs_t.cc.
115 auto const& people =
config().people();
116 auto const ref = {Person{
"Alice", 1},
118 Person{
"Charlie", 3},
119 Person{
"Danielle", 4},
121 BOOST_TEST(people == ref, boost::test_tools::per_element{});
BOOST_AUTO_TEST_CASE |
( |
tupleAs_inSequence_2 |
| ) |
|
Definition at line 124 of file tupleAs_t.cc.
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{});