| 57 | } |
| 58 | |
| 59 | bool TestCaseReader::boolSetting(std::string const& _name, bool _defaultValue) |
| 60 | { |
| 61 | if (m_settings.count(_name) == 0) |
| 62 | return _defaultValue; |
| 63 | |
| 64 | m_unreadSettings.erase(_name); |
| 65 | std::string value = m_settings.at(_name); |
| 66 | if (value == "false") |
| 67 | return false; |
| 68 | if (value == "true") |
| 69 | return true; |
| 70 | |
| 71 | BOOST_THROW_EXCEPTION(std::runtime_error("Invalid Boolean value: " + value + ".")); |
| 72 | } |
| 73 | |
| 74 | size_t TestCaseReader::sizetSetting(std::string const& _name, size_t _defaultValue) |
| 75 | { |
no test coverage detected