From: Vadim Zeitlin Date: Sat, 6 Jul 2013 19:14:20 +0000 (+0000) Subject: Disable test for setting the creation time under Unix. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2d5efafe74f3788bfd3b3d8b1e8e13135a595ed5 Disable test for setting the creation time under Unix. Also document that this doesn't work there. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/filename.h b/interface/wx/filename.h index beeb7ff7dd..29f79a94f6 100644 --- a/interface/wx/filename.h +++ b/interface/wx/filename.h @@ -1260,6 +1260,10 @@ public: /** Sets the file creation and last access/modification times (any of the pointers may be @NULL). + + Notice that the file creation time can't be changed under Unix, so @a + dtCreate is ignored there (but @true is still returned). Under Windows + all three times can be set. */ bool SetTimes(const wxDateTime* dtAccess, const wxDateTime* dtMod, diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index 3117760f13..64100e85a6 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -685,7 +685,11 @@ void FileNameTestCase::TestSetTimes() CPPUNIT_ASSERT( fn.GetTimes(&dtAccess2, &dtModify2, &dtCreate2) ); CPPUNIT_ASSERT_EQUAL( dtAccess, dtAccess2 ); CPPUNIT_ASSERT_EQUAL( dtModify, dtModify2 ); + + // Under Unix the creation time can't be set. +#ifdef __WINDOWS__ CPPUNIT_ASSERT_EQUAL( dtCreate, dtCreate2 ); +#endif // __WINDOWS__ } void FileNameTestCase::TestExists()