]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/net/socket.cpp
compilation fix in FindPaperType() after latest change
[wxWidgets.git] / tests / net / socket.cpp
index a34993bc7bb2ce0a3eb7bb16faa782e6606f240f..5928915e410a556341833d6936a22e8e3b09f03c 100644 (file)
@@ -179,7 +179,7 @@ void SocketTestCase::ReadNormal()
     sock->Read(bufSmall, WXSIZEOF(bufSmall));
 
     CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() );
-    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), sock->LastCount() );
+    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), (size_t)sock->LastCount() );
 
 
     char bufBig[102400];
@@ -199,7 +199,7 @@ void SocketTestCase::ReadBlock()
     sock->Read(bufSmall, WXSIZEOF(bufSmall));
 
     CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() );
-    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), sock->LastCount() );
+    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), (size_t)sock->LastCount() );
 
 
     char bufBig[102400];
@@ -235,7 +235,7 @@ void SocketTestCase::ReadWaitall()
     sock->Read(buf, WXSIZEOF(buf));
 
     CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() );
-    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(buf), sock->LastCount() );
+    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(buf), (size_t)sock->LastCount() );
 }
 
 void SocketTestCase::UrlTest()
@@ -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() );