diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-20 16:16:17 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-20 16:16:17 +0000 |
| commit | f353b192693291e842e297118d5899c63a5a8e22 (patch) | |
| tree | 8f8613ea9fee2be419b11b1eee08c3f8acdb3e33 /test | |
| parent | 5e5750712fb6686cb4a192b3b232be96ad879b49 (diff) | |
Tweaks to LocalTime; build/install fixes.
Diffstat (limited to 'test')
| -rw-r--r-- | test/local_time_test.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/local_time_test.cc b/test/local_time_test.cc index b7f49a32..2c61fd14 100644 --- a/test/local_time_test.cc +++ b/test/local_time_test.cc @@ -58,6 +58,15 @@ BOOST_AUTO_TEST_CASE (local_time_test) BOOST_CHECK_EQUAL (t._tz_hour, -9); BOOST_CHECK_EQUAL (t._tz_minute, 30); BOOST_CHECK_EQUAL (t.as_string(), "2011-11-20T01:06:59-09:30"); - } + } + + /* Construction from boost::posix_time::ptime */ + dcp::LocalTime b (boost::posix_time::time_from_string ("2002-01-20 19:03:56")); + BOOST_CHECK_EQUAL (b._year, 2002); + BOOST_CHECK_EQUAL (b._month, 1); + BOOST_CHECK_EQUAL (b._day, 20); + BOOST_CHECK_EQUAL (b._hour, 19); + BOOST_CHECK_EQUAL (b._minute, 3); + BOOST_CHECK_EQUAL (b._second, 56); } |
