#include "boost/test/unit_test.hpp"
#include <string>
#include <vector>
#include "fhiclcpp/DatabaseSupport.h"
#include "fhiclcpp/ParameterSet.h"
Go to the source code of this file.
#define BOOST_TEST_MODULE (database test) |
BOOST_AUTO_TEST_CASE |
( |
no_nesting |
| ) |
|
Definition at line 13 of file DatabaseSupport_t.cc.
15 std::vector<std::string> records;
16 std::vector<std::string> hashes;
19 BOOST_TEST(records.size() == hashes.size());
20 BOOST_TEST(records.size() == 1ul);
void decompose_fhicl(std::string const &filename, std::vector< std::string > &records, std::vector< std::string > &hashes)
BOOST_AUTO_TEST_CASE |
( |
two_nested |
| ) |
|
Definition at line 23 of file DatabaseSupport_t.cc.
25 std::vector<std::string> records;
26 std::vector<std::string> hashes;
31 std::cout <<
"Compact string:\n";
32 std::cout <<
p.to_compact_string() <<
std::endl;
33 std::cout <<
"Non compact string:\n";
37 BOOST_TEST(records.size() == hashes.size());
38 BOOST_TEST(records.size() == 3ul);
static ParameterSet make(intermediate_table const &tbl)
QTextStream & endl(QTextStream &s)
void decompose_fhicl(std::string const &filename, std::vector< std::string > &records, std::vector< std::string > &hashes)
BOOST_AUTO_TEST_CASE |
( |
nested_vector |
| ) |
|
Definition at line 41 of file DatabaseSupport_t.cc.
43 std::vector<std::string> records;
44 std::vector<std::string> hashes;
48 auto const v =
p.get<std::vector<fhicl::ParameterSet>>(
"a");
50 std::cout <<
p.to_compact_string() <<
std::endl;
51 BOOST_TEST(v.size() == 2ul);
54 BOOST_TEST(records.size() == hashes.size());
55 BOOST_TEST(records.size() == 3ul);
static ParameterSet make(intermediate_table const &tbl)
QTextStream & endl(QTextStream &s)
void decompose_fhicl(std::string const &filename, std::vector< std::string > &records, std::vector< std::string > &hashes)