test: use find instead of get<T>(v.at(""))

This commit is contained in:
ToruNiina 2019-06-02 22:12:32 +09:00
parent 296ba060ef
commit ad3c1950f2

View File

@ -20,7 +20,7 @@ BOOST_AUTO_TEST_CASE(test_example)
auto serialized = toml::parse("tmp1.toml");
{
auto& owner = toml::get<toml::table>(serialized.at("owner"));
auto& owner = toml::find<toml::table>(serialized, "owner");
auto& bio = toml::get<std::string>(owner.at("bio"));
const auto CR = std::find(bio.begin(), bio.end(), '\r');
if(CR != bio.end())