Provide more information if wxDateTime DST test fails

Show the original date and the date after modification.
This commit is contained in:
Vadim Zeitlin
2017-11-28 23:18:43 +01:00
parent 369e6f6554
commit efb8d82c8a

View File

@@ -1588,6 +1588,7 @@ static void DoTestSetFunctionsOnDST(const wxDateTime &orig)
{ \ { \
wxDateTime copy = orig; \ wxDateTime copy = orig; \
copy.func; \ copy.func; \
INFO("Original date=" << orig << ", modified=" << copy); \
CHECK(orig.IsDST() == copy.IsDST()); \ CHECK(orig.IsDST() == copy.IsDST()); \
CHECK(orig.GetHour() == copy.GetHour()); \ CHECK(orig.GetHour() == copy.GetHour()); \
} }
@@ -1612,6 +1613,7 @@ static void DoTestSetFunctionsOnDST(const wxDateTime &orig)
// Special case for set hour since it's ambiguous at DST we don't care if IsDST matches // Special case for set hour since it's ambiguous at DST we don't care if IsDST matches
wxDateTime copy = orig; wxDateTime copy = orig;
copy.SetHour(orig.GetHour()); copy.SetHour(orig.GetHour());
INFO("Original date=" << orig << ", modified=" << copy);
CHECK(orig.GetHour() == copy.GetHour()); CHECK(orig.GetHour() == copy.GetHour());
} }
#undef DST_TEST_FUN #undef DST_TEST_FUN