Macros | Functions | Variables
searchAllowedConfiguration_t.cc File Reference
#include "boost/test/unit_test.hpp"
#include "fhiclcpp/types/Atom.h"
#include "fhiclcpp/types/Sequence.h"
#include "fhiclcpp/types/Table.h"
#include "fhiclcpp/types/Tuple.h"
#include "fhiclcpp/types/detail/SearchAllowedConfiguration.h"
#include <string>

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   (search allowed configuration test)
 

Functions

 BOOST_AUTO_TEST_CASE (table_t)
 
 BOOST_AUTO_TEST_CASE (seqInSeq_t)
 

Variables

auto supports_key = SearchAllowedConfiguration::supports_key
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   (search allowed configuration test)

Definition at line 1 of file searchAllowedConfiguration_t.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( table_t  )

Definition at line 34 of file searchAllowedConfiguration_t.cc.

35 {
36  Table<S> t{Name{"table"}};
37  BOOST_TEST(supports_key(t, "atom"));
38  BOOST_TEST(!supports_key(t, "table.atom"));
39  BOOST_TEST(!supports_key(t, "table.sequence"));
40  BOOST_TEST(supports_key(t, "sequence"));
41  BOOST_TEST(supports_key(t, "sequence[0]"));
42  BOOST_TEST(!supports_key(t, "[0]"));
43  BOOST_TEST(supports_key(t, "table2"));
44  BOOST_TEST(supports_key(t, "tuple2[0][1]"));
45  BOOST_TEST(supports_key(t, "tuple2[1]"));
46 }
BOOST_AUTO_TEST_CASE ( seqInSeq_t  )

Definition at line 48 of file searchAllowedConfiguration_t.cc.

49 {
50  Sequence<Sequence<int, 2>> s{Name{"nestedSequence"}};
51  BOOST_TEST(supports_key(s, "[0]"));
52  BOOST_TEST(supports_key(s, "[0][0]"));
53  BOOST_TEST(supports_key(s, "[0][1]"));
54 }
static QCString * s
Definition: config.cpp:1042

Variable Documentation

auto supports_key = SearchAllowedConfiguration::supports_key

Definition at line 16 of file searchAllowedConfiguration_t.cc.