mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 00:38:08 +08:00
turn test_parse_file on
the required change is; - change Datetime -> offset_datetime and construct correctly.
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
@@ -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"));
|
||||
|
Reference in New Issue
Block a user