19 #include <boost/test/unit_test.hpp>
26 BOOST_AUTO_TEST_SUITE(physical)
31 Config config1(
"name1",
"value1");
32 Config config2(
"name2",
"value2");
33 Config config3(
"name3",
"value3");
34 Config config4(
"name4",
"value4");
53 configMap1.
getConfig(
"config", name, value);
54 configMap2.
setConfig(
"ending", name, value);
63 BOOST_CHECK(configMap1.
hasConfig(
"config"));
64 BOOST_CHECK(configMap1.
hasConfig(
"_config"));
77 BOOST_CHECK_EQUAL(config2, config5);
81 BOOST_CHECK_EQUAL(config3, p->second); p++;
82 BOOST_CHECK_EQUAL(config4, p->second); p++;
83 BOOST_CHECK_EQUAL(config2, p->second); p++;
87 std::pair<ConfigMap::const_iterator, ConfigMap::const_iterator> range
91 BOOST_CHECK_EQUAL(config3, p->second); p++;
92 BOOST_CHECK_EQUAL(config4, p->second); p++;
114 BOOST_AUTO_TEST_SUITE_END()
void clearConfig(void)
Clears the configuration map.
void setConfig(const string &inSetting, const Config &inConfig)
Sets the configuration for the given setting.
Header for the ConfigMap class.
bool getConfig(const string &inSetting, Config &outConfig)
Looks up the specified setting in the map.
size_t getConfigCount(void) const
Returns the number of configurations in the map.
void addConfigs(const ConfigMap &inConfigMap)
Merges the configurations from the given ConfigMap into this one.
BOOST_AUTO_TEST_CASE(XdlUnpackUnitTest)
Unit test for the XdlUnpack class.
const_iterator const_iterator
Constant iterator to {setting,Config} pairs.
const_iterator configBegin(void) const
Returns the begin constant iterator for configurations.
size_type getMultiConfigCount(const string &inSetting)
Returns the number of configurations for the given setting.
Configuration. A {name:value} pair.
bool hasConfig(const string &inSetting) const
Returns true if the specified setting exists in the map.
Header for torc::physical output stream helpers.
Configuration setting map.
bool configIsEmpty(void) const
Returns true if the configuration map is empty.
std::pair< iterator, iterator > getMultiConfigValues(const string &inSetting)
Returns a range that encompasses all of the configurations for the given setting. ...
const_iterator configEnd(void) const
Returns the end constant iterator for configurations.