Commit Graph

38 Commits

Author SHA1 Message Date
Vadim Zeitlin
1de532f57e get rid of special WX_ASSERT_FOO_EQUAL macros by defining CppUnit::assertEquals() overloads for wx types
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-18 23:07:23 +00:00
Vadim Zeitlin
425eee4164 correct some compatibility problems with the existing Unicode-mode code (#9513), more remains to be done (#9560)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-09 22:50:55 +00:00
Vadim Zeitlin
a669640b7a really fix the test to work in any time zone and with or without DST
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-01 15:44:16 +00:00
Vadim Zeitlin
cf9f673789 fix wxDateTime::ParseRfc822Date() to handle missing seconds (ticket #1341)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-01 14:37:26 +00:00
Vadim Zeitlin
77fa3d8243 add a special macro for comparing time_t values to fix unit test compilation on platforms with 64 bit time_t (such as FreeBSD 6.2 apparently)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-01 13:01:59 +00:00
Vadim Zeitlin
c4e2528835 fix time zone conversion test to work in any time zone, not just GMT+1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-01 12:58:43 +00:00
Vadim Zeitlin
c226adeedb use CPPUNIT_ASSERT_EQUAL instead of CPPUNIT_ASSERT to have more details when the test fails
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-31 23:08:57 +00:00
Vadim Zeitlin
f3f2e255b4 added wxDateTime::FormatISOCombined() and ParseISODate/Time/Combined()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-03 13:04:56 +00:00
Vadim Zeitlin
3781c92083 don't write wide string to std::ostream which outputs them as pointer values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-16 22:15:18 +00:00
Vadim Zeitlin
5098c258b2 compilation fixes for VC6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-13 01:13:03 +00:00
Vadim Zeitlin
71ebd60b06 make wxDateTime::ParseXXX() functions char*-friendly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-07 00:17:45 +00:00
Vadim Zeitlin
b7c746d017 added WX_ASSERT_MESSAGE macro to simply using CPPUNIT_ASSERT_MESSAGE with wxString::Format()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-06 22:57:09 +00:00
Vadim Zeitlin
1cf57808cb fix bug with parsing negative time zones in ParseRfc822Date()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-30 23:35:40 +00:00
Vadim Zeitlin
804eeca5d5 don't misinterpret the time after the date as a weekday (patch 1836708)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-15 21:03:21 +00:00
Vadim Zeitlin
c6a95dd6a2 really fixed the DST test by using explicit country in it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-30 19:28:29 +00:00
Vadim Zeitlin
770882a69e return the beginning/end of DST in local time, not UTC, for consistency with the other methods; fixed the test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-30 19:27:23 +00:00
Václav Slavík
8650108199 don't use implicit wxString->char*/wchar_t* conversion, it will not be available in wxUSE_STL build in the future
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-10 17:42:41 +00:00
Vadim Zeitlin
fb96cf856e added wxDateTime::GetDateOnly()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-18 14:06:37 +00:00
Vadim Zeitlin
d581cac5e8 fix gcc compilation warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-28 17:04:52 +00:00
Vadim Zeitlin
c7564c6ac9 added more time span formatting tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-20 15:11:18 +00:00
Vadim Zeitlin
e566ccf1ba handle negative time spans correctly in Format()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-20 15:04:10 +00:00
Vadim Zeitlin
9807f99505 fixed TestTimeFormat() test: and can use 2 digit years which broke dates comparison for dates not in this (nor last) century
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-20 13:41:49 +00:00
Vadim Zeitlin
1bf29a7a6c added wxTimeSpan::Format() test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-20 13:20:00 +00:00
Vadim Zeitlin
8605eb1abe added ParseDate() tests; use CPPUNIT_ASSERT_EQUAL to see the dates in cppunit output
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-21 16:21:18 +00:00
Vadim Zeitlin
34af0de434 compilation fixes for wxUSE_DATETIME==0 (another part of patch 1203970)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-11 16:20:28 +00:00
Roger Gammans
42b62acfc2 Add flags to test dates struct which allow us to skip ecpected failures.
Use new flags feature to allow us to test format dates outside the two digit
 year parse range.
 Add dates to test for sf.net bug #1357272 and a couple of related issues.
  (eg,6Feb{1856,1857,1937}) .


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-05 14:05:39 +00:00
Vadim Zeitlin
d26adb9df7 Fixed several bugs in wxDateTime timezone handling:
- ToTimezone() and MakeTimezone() now work as expected
 - added and documented FromTimezone() and MakeFromTimezone()
 - Set(double jdn) interprets jdn always in UTC
 - updated ParseRfc822Date() timezone handling
 - removed workarounds for old bugs from the test


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-28 13:06:36 +00:00
Vadim Zeitlin
fcae713511 another test for DST bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-28 00:23:05 +00:00
Vadim Zeitlin
a480d0ab83 added test for the DST bug (patch 1097811)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-31 01:36:28 +00:00
Włodzimierz Skiba
cad3d9c14c MinGW warning fix for hundreds of not initialized members.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-19 15:41:09 +00:00
Ryan Norton
8899b155a1 [ 1068188 ] Precompiled header for the test program [Modified a bit]
Regen bakefiles for unit tests


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-22 05:00:19 +00:00
Ryan Norton
aa3698d5d0 fix datetime tests for non-westeurope time zones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-10 09:31:13 +00:00
Ryan Norton
a9e9946154 Rename some tests to avoid conflicts with project builder GUI debugger
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-31 04:41:27 +00:00
Vadim Zeitlin
4c27e2faf3 deprecated SetToTheWeek() and GetWeek(); added and documented new and well-defined SetToWeekOfYear()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-11 22:07:10 +00:00
Vadim Zeitlin
1c5d27e2ab fixed GetWeekOfYear() for first/last week in some cases (patch 908793)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-11 21:37:28 +00:00
Włodzimierz Skiba
592f132d04 Removed unused code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-24 08:00:23 +00:00
Vadim Zeitlin
e35594251f added Set(jdn) test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-23 21:54:34 +00:00
Vadim Zeitlin
ccd6aacd5d extracted some wxDateTime tests from console sample to the unit test suite
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-23 21:18:16 +00:00