turn test_parse_file on

the required change is;
- change Datetime -> offset_datetime and construct correctly.
This commit is contained in:
ToruNiina
2018-12-13 02:26:55 +09:00
parent 514f3c773f
commit 4d7cfc9d1d
2 changed files with 5 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ set(TEST_NAMES
test_get_related_func
test_to_toml
test_from_toml
# test_parse_file
test_parse_file
# test_parse_unicode
)

View File

@@ -22,7 +22,8 @@ BOOST_AUTO_TEST_CASE(test_example)
BOOST_CHECK_EQUAL(toml::get<std::string>(owner.at("bio")),
"GitHub Cofounder & CEO\nLikes tater tots and beer.");
BOOST_CHECK_EQUAL(toml::get<toml::Datetime>(owner.at("dob")),
toml::Datetime(1979, 5, 27, 7, 32, 0, 0, 0, 0, 0));
toml::offset_datetime(toml::local_date(1979, toml::month_t::May, 27),
toml::local_time(7, 32, 0), toml::time_offset(0, 0)));
}
toml::Table database = toml::get<toml::Table>(data.at("database"));
@@ -90,7 +91,8 @@ BOOST_AUTO_TEST_CASE(test_example_stream)
BOOST_CHECK_EQUAL(toml::get<std::string>(owner.at("bio")),
"GitHub Cofounder & CEO\nLikes tater tots and beer.");
BOOST_CHECK_EQUAL(toml::get<toml::Datetime>(owner.at("dob")),
toml::Datetime(1979, 5, 27, 7, 32, 0, 0, 0, 0, 0));
toml::offset_datetime(toml::local_date(1979, toml::month_t::May, 27),
toml::local_time(7, 32, 0), toml::time_offset(0, 0)));
}
toml::Table database = toml::get<toml::Table>(data.at("database"));