MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CheckValues

Function CheckValues

src/test/settings_tests.cpp:111–120  ·  view source on GitHub ↗

Check settings struct contents against expected json strings.

Source from the content-addressed store, hash-verified

109
110//! Check settings struct contents against expected json strings.
111static void CheckValues(const common::Settings& settings, const std::string& single_val, const std::string& list_val)
112{
113 common::SettingsValue single_value = GetSetting(settings, "section", "name", false, false, false);
114 common::SettingsValue list_value(common::SettingsValue::VARR);
115 for (const auto& item : GetSettingsList(settings, "section", "name", false)) {
116 list_value.push_back(item);
117 }
118 BOOST_CHECK_EQUAL(single_value.write().c_str(), single_val);
119 BOOST_CHECK_EQUAL(list_value.write().c_str(), list_val);
120};
121
122// Simple settings merge test case.
123BOOST_AUTO_TEST_CASE(Simple)

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 4

GetSettingFunction · 0.85
GetSettingsListFunction · 0.85
push_backMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected