X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cab8f76eb8068da0da7e23768ca6d6ecf74b5a21..55f9f0cbc8dcf45f8d484b2f931c5c254d4404d1:/samples/console/console.cpp diff --git a/samples/console/console.cpp b/samples/console/console.cpp index 90178e2339..8f932dcdd7 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -95,7 +95,7 @@ #undef TEST_ALL static const bool TEST_ALL = true; #else - #define TEST_SOCKETS + #define TEST_FILECONF static const bool TEST_ALL = false; #endif @@ -798,6 +798,12 @@ static void TestFileConfRead() cont = fileconf.GetNextEntry(name, dummy); } + + static const wxChar *testEntry = _T("TestEntry"); + wxPrintf(_T("\nTesting deletion of newly created \"Test\" entry: ")); + fileconf.Write(testEntry, _T("A value")); + fileconf.DeleteEntry(testEntry); + wxPrintf(fileconf.HasEntry(testEntry) ? _T("ERROR\n") : _T("ok\n")); } #endif // TEST_FILECONF @@ -1043,7 +1049,7 @@ static void TestFileNameMakeAbsolute() { const FileNameInfo& fni = filenames[n]; wxFileName fn(fni.fullname, fni.format); - + wxPrintf(_T("'%s' absolutized: "), fn.GetFullPath(fni.format).c_str()); fn.MakeAbsolute(); @@ -4156,7 +4162,6 @@ static void TestZlibStreamRead() #include -#include "wx/date.h" #include "wx/datetime.h" // the test data @@ -5156,38 +5161,6 @@ static void TestTimeSpanFormat() wxPuts(_T("")); } -#if 0 - -// test compatibility with the old wxDate/wxTime classes -static void TestTimeCompatibility() -{ - wxPuts(_T("\n*** wxDateTime compatibility test ***")); - - wxPrintf(_T("wxDate for JDN 0: %s\n"), wxDate(0l).FormatDate().c_str()); - wxPrintf(_T("wxDate for MJD 0: %s\n"), wxDate(2400000).FormatDate().c_str()); - - double jdnNow = wxDateTime::Now().GetJDN(); - long jdnMidnight = (long)(jdnNow - 0.5); - wxPrintf(_T("wxDate for today: %s\n"), wxDate(jdnMidnight).FormatDate().c_str()); - - jdnMidnight = wxDate().Set().GetJulianDate(); - wxPrintf(_T("wxDateTime for today: %s\n"), - wxDateTime((double)(jdnMidnight + 0.5)).Format("%c", wxDateTime::GMT0).c_str()); - - int flags = wxEUROPEAN;//wxFULL; - wxDate date; - date.Set(); - wxPrintf(_T("Today is %s\n"), date.FormatDate(flags).c_str()); - for ( int n = 0; n < 7; n++ ) - { - wxPrintf(_T("Previous %s is %s\n"), - wxDateTime::GetWeekDayName((wxDateTime::WeekDay)n), - date.Previous(n + 1).FormatDate(flags).c_str()); - } -} - -#endif // 0 - #endif // TEST_DATETIME // ----------------------------------------------------------------------------