Macros | Typedefs | Functions
table_t_iterator_t.cc File Reference
#include "boost/test/unit_test.hpp"
#include "fhiclcpp/extended_value.h"

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   (table_t_iterator_t)
 

Typedefs

using table_t = fhicl::extended_value::table_t
 

Functions

 BOOST_AUTO_TEST_CASE (iterator_comparisons_1)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   (table_t_iterator_t)

Definition at line 1 of file table_t_iterator_t.cc.

Typedef Documentation

Definition at line 7 of file table_t_iterator_t.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( iterator_comparisons_1  )

Definition at line 14 of file table_t_iterator_t.cc.

15 {
16  BOOST_TEST(::shims::isSnippetMode(SNIPPET_MODE) == SNIPPET_MODE);
17 
18  table_t table;
19  table_t const& ctable = table;
20  BOOST_TEST(table.cbegin() == table.cend());
21  BOOST_TEST(table.cbegin() == table.end());
22  BOOST_TEST(table.begin() == table.end());
23  BOOST_TEST(table.begin() == table.cend());
24  BOOST_TEST(ctable.begin() == ctable.end());
25  BOOST_TEST(table.begin() == table.end());
26  BOOST_TEST(ctable.begin() == table.end());
27  BOOST_TEST(table.begin() == ctable.end());
28  table.emplace("string1", extended_value{false, STRING, "string"});
29  BOOST_TEST(table.cbegin() != table.cend());
30  BOOST_TEST(table.cbegin() != table.end());
31  BOOST_TEST(table.begin() != table.end());
32  BOOST_TEST(table.begin() != table.cend());
33  BOOST_TEST(ctable.begin() != ctable.end());
34  BOOST_TEST(table.begin() != table.end());
35  BOOST_TEST(ctable.begin() != table.end());
36  BOOST_TEST(table.begin() != ctable.end());
37 }
iterator begin()
Definition: stdmap_shims.h:150
bool isSnippetMode(bool m)
Definition: parse_shims.cc:9
std::pair< iterator, bool > emplace(Args &&...args)
Definition: stdmap_shims.h:309
iterator end()
Definition: stdmap_shims.h:171
const_iterator cbegin() const
Definition: stdmap_shims.h:165
const_iterator cend() const
Definition: stdmap_shims.h:187