Skip to content
Snippets Groups Projects
Commit ee2a5c39 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: add primitive dumper for boost::gregorian::date


Change-Id: Ie276457dc965a9b971382fd927e3049103397f0d
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent f5a737e0
No related branches found
No related tags found
No related merge requests found
...@@ -2052,6 +2052,11 @@ def qdump__boost__shared_ptr(d, value): ...@@ -2052,6 +2052,11 @@ def qdump__boost__shared_ptr(d, value):
d.putIntItem("usecount", usecount) d.putIntItem("usecount", usecount)
def qdump__boost__gregorian__date(d, value):
d.putValue(value["days_"], JulianDate)
d.putNumChild(0)
####################################################################### #######################################################################
# #
# Symbian # Symbian
......
...@@ -159,6 +159,7 @@ void dummyStatement(...) {} ...@@ -159,6 +159,7 @@ void dummyStatement(...) {}
#if USE_BOOST #if USE_BOOST
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
#endif #endif
#if USE_EIGEN #if USE_EIGEN
...@@ -5068,11 +5069,52 @@ namespace boost { ...@@ -5068,11 +5069,52 @@ namespace boost {
dummyStatement(&s, &j, &sl); dummyStatement(&s, &j, &sl);
} }
void testBoostGregorianDate()
{
using namespace boost;
using namespace gregorian;
date d(2005, Nov, 29);
BREAK_HERE;
// Check d Tue Nov 29 2005 boost::gregorian::date.
// Continue
d += months(1);
BREAK_HERE;
// Check d Thu Dec 29 2005 boost::gregorian::date.
// Continue
d += months(1);
BREAK_HERE;
// Check d Sun Jan 29 2006 boost::gregorian::date.
// Continue
// snap-to-end-of-month behavior kicks in:
d += months(1);
BREAK_HERE;
// Check d Tue Feb 28 2006 boost::gregorian::date6.
// Continue.
// Also end of the month (expected in boost)
d += months(1);
BREAK_HERE;
// Check d Fri Mar 31 2006 boost::gregorian::date.
// Continue.
// Not where we started (expected in boost)
d -= months(4);
BREAK_HERE;
// Check d Tue Nov 30 2005 boost::gregorian::date.
// Continue.
dummyStatement(&d);
}
void testBoost() void testBoost()
{ {
testBoostOptional1(); testBoostOptional1();
testBoostOptional2(); testBoostOptional2();
testBoostSharedPtr(); testBoostSharedPtr();
testBoostGregorianDate();
} }
#else #else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment