moved non-interactive tests for wxDynamicLibrary, wxGet/SetEnv, wxTempFile, wxCopyFile to appropriate CppUnit test suites;

removed wxFile and wxTextFile tests (complete testsuites already exist for them)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2010-06-13 14:30:55 +00:00
parent 16a97d7e9a
commit 69fc85873d
16 changed files with 435 additions and 288 deletions

View File

@@ -37,6 +37,7 @@ private:
CPPUNIT_TEST( RoundTripUTF8 );
CPPUNIT_TEST( RoundTripUTF16 );
CPPUNIT_TEST( RoundTripUTF32 );
CPPUNIT_TEST( TempFile );
CPPUNIT_TEST_SUITE_END();
void RoundTripUTF8() { DoRoundTripTest(wxConvUTF8); }
@@ -44,6 +45,7 @@ private:
void RoundTripUTF32() { DoRoundTripTest(wxMBConvUTF32()); }
void DoRoundTripTest(const wxMBConv& conv);
void TempFile();
wxDECLARE_NO_COPY_CLASS(FileTestCase);
};
@@ -92,4 +94,12 @@ void FileTestCase::DoRoundTripTest(const wxMBConv& conv)
}
}
void FileTestCase::TempFile()
{
wxTempFile tmpFile;
CPPUNIT_ASSERT( tmpFile.Open(wxT("test2")) && tmpFile.Write(wxT("the answer is 42")) );
CPPUNIT_ASSERT( tmpFile.Commit() );
CPPUNIT_ASSERT( wxRemoveFile(wxT("test2")) );
}
#endif // wxUSE_FILE