TimeMap: replace boost::gregorian::date by boost::posix_time::ptime

this is necessary because boost::gregorian::date does not have a
notion of "time during a day" which is required to specify time step
lengths less than a day...
This commit is contained in:
Andreas Lauser
2014-02-21 16:31:55 +01:00
parent 1f9c5d2583
commit 18eb2fd8f4
12 changed files with 102 additions and 97 deletions

View File

@@ -95,14 +95,14 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckMissingReturnsDefaults) {
DeckKeywordPtr keyword(new DeckKeyword("SCHEDULE"));
deck->addKeyword( keyword );
Schedule schedule(deck);
BOOST_CHECK_EQUAL( schedule.getStartDate() , boost::gregorian::date( 1983 , boost::gregorian::Jan , 1));
BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1983 , boost::gregorian::Jan , 1)));
}
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithStart) {
DeckPtr deck = createDeck();
Schedule schedule(deck);
BOOST_CHECK_EQUAL( schedule.getStartDate() , boost::gregorian::date( 1998 , boost::gregorian::Mar , 8));
BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1998 , boost::gregorian::Mar , 8)));
}