Changeset View
Changeset View
Standalone View
Standalone View
src/test/scriptflags.cpp
Show All 40 Lines | if (strFlags.empty()) { | ||||
return 0; | return 0; | ||||
} | } | ||||
uint32_t flags = 0; | uint32_t flags = 0; | ||||
std::vector<std::string> words; | std::vector<std::string> words; | ||||
boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(",")); | boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(",")); | ||||
for (std::string &word : words) { | for (std::string &word : words) { | ||||
if (!mapFlagNames.count(word)) | if (!mapFlagNames.count(word)) { | ||||
BOOST_ERROR("Bad test: unknown verification flag '" << word << "'"); | BOOST_ERROR("Bad test: unknown verification flag '" << word << "'"); | ||||
} | |||||
flags |= mapFlagNames[word]; | flags |= mapFlagNames[word]; | ||||
} | } | ||||
return flags; | return flags; | ||||
} | } | ||||
std::string FormatScriptFlags(uint32_t flags) { | std::string FormatScriptFlags(uint32_t flags) { | ||||
if (flags == 0) { | if (flags == 0) { | ||||
Show All 14 Lines |