From 4d7cfc9d1d7cda40e2349762e7068b0a05ed8f5d Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Thu, 13 Dec 2018 02:26:55 +0900 Subject: [PATCH] turn test_parse_file on the required change is; - change Datetime -> offset_datetime and construct correctly. --- tests/CMakeLists.txt | 2 +- tests/test_parse_file.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7940376..3167ef6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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 ) diff --git a/tests/test_parse_file.cpp b/tests/test_parse_file.cpp index 4222921..95f178c 100644 --- a/tests/test_parse_file.cpp +++ b/tests/test_parse_file.cpp @@ -22,7 +22,8 @@ BOOST_AUTO_TEST_CASE(test_example) BOOST_CHECK_EQUAL(toml::get(owner.at("bio")), "GitHub Cofounder & CEO\nLikes tater tots and beer."); BOOST_CHECK_EQUAL(toml::get(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(data.at("database")); @@ -90,7 +91,8 @@ BOOST_AUTO_TEST_CASE(test_example_stream) BOOST_CHECK_EQUAL(toml::get(owner.at("bio")), "GitHub Cofounder & CEO\nLikes tater tots and beer."); BOOST_CHECK_EQUAL(toml::get(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(data.at("database"));