]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/net/socket.cpp
insert missing iclude file
[wxWidgets.git] / tests / net / socket.cpp
index 69b1b4daa9cd5019590cdf7c08458d57c0759435..c0eb7e8fe945e733f47be547b4b4bdc4080f039a 100644 (file)
@@ -50,13 +50,13 @@ private:
         CPPUNIT_TEST( ReadNormal ); \
         CPPUNIT_TEST( ReadBlock ); \
         CPPUNIT_TEST( ReadNowait ); \
-        CPPUNIT_TEST( ReadWaitall )
+        CPPUNIT_TEST( ReadWaitall ); \
+        CPPUNIT_TEST( UrlTest )
 
     CPPUNIT_TEST_SUITE( SocketTestCase );
         ALL_SOCKET_TESTS();
         CPPUNIT_TEST( PseudoTest_SetUseEventLoop );
         ALL_SOCKET_TESTS();
-        CPPUNIT_TEST( UrlTest );
     CPPUNIT_TEST_SUITE_END();
 
     // helper event loop class which sets itself as active only if we pass it
@@ -246,8 +246,9 @@ void SocketTestCase::UrlTest()
     SocketTestEventLoop loop(ms_useLoop);
 
     wxURL url("http://" + gs_serverHost);
-    wxInputStream * const in = url.GetInputStream();
-    CPPUNIT_ASSERT( in );
+
+    const std::auto_ptr<wxInputStream> in(url.GetInputStream());
+    CPPUNIT_ASSERT( in.get() );
 
     wxStringOutputStream out;
     CPPUNIT_ASSERT_EQUAL( wxSTREAM_EOF, in->Read(out).GetLastError() );