X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0912690b65b3c58c0e12870fb971675ca5572ae6..ae8079a2109cc4cfe27fe5de16679726dd7660ca:/tests/filekind/filekind.cpp diff --git a/tests/filekind/filekind.cpp b/tests/filekind/filekind.cpp index 7cb6aa38ca..a7d81f81a4 100644 --- a/tests/filekind/filekind.cpp +++ b/tests/filekind/filekind.cpp @@ -4,7 +4,7 @@ // Author: Mike Wetherell // RCS-ID: $Id$ // Copyright: (c) 2005 Mike Wetherell -// Licence: wxWidgets licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #include "testprec.h" @@ -18,6 +18,8 @@ #include "wx/wx.h" #endif +#if wxUSE_STREAMS + #ifdef __UNIX__ #include #endif @@ -30,7 +32,11 @@ #include "wx/sckstrm.h" #include "wx/mstream.h" -#if wxUSE_STREAMS +#ifdef __VISUALC__ + #define isatty _isatty + #define fdopen _fdopen + #define fileno _fileno +#endif /////////////////////////////////////////////////////////////////////////////// // The test case @@ -47,7 +53,9 @@ class FileKindTestCase : public CppUnit::TestCase #endif CPPUNIT_TEST(Stdin); CPPUNIT_TEST(MemoryStream); +#if wxUSE_SOCKETS CPPUNIT_TEST(SocketStream); +#endif CPPUNIT_TEST_SUITE_END(); void File(); @@ -55,7 +63,9 @@ class FileKindTestCase : public CppUnit::TestCase void Socket(); void Stdin(); void MemoryStream(); +#if wxUSE_SOCKETS void SocketStream(); +#endif void TestFILE(wxFFile& file, bool expected); void TestFd(wxFile& file, bool expected); @@ -103,7 +113,7 @@ void FileKindTestCase::File() { TempFile tmp; // put first wxFile file; - tmp.m_name = wxFileName::CreateTempFileName(_T("wxft"), &file); + tmp.m_name = wxFileName::CreateTempFileName(wxT("wxft"), &file); TestFd(file, true); file.Close(); @@ -196,7 +206,7 @@ void FileKindTestCase::Stdin() // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION(FileKindTestCase); -// also include in it's own registry so that these tests can be run alone +// also include in its own registry so that these tests can be run alone CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(FileKindTestCase, "FileKindTestCase"); #endif // wxUSE_STREAMS