X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6799c5e2838d7a61a3aa7564a5ab91b24b7fa5f1..fdb97de42b8a1491257566fb7bbd343916f1f2b8:/tests/net/socket.cpp diff --git a/tests/net/socket.cpp b/tests/net/socket.cpp index 69b1b4daa9..5928915e41 100644 --- a/tests/net/socket.cpp +++ b/tests/net/socket.cpp @@ -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 @@ -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 in(url.GetInputStream()); + CPPUNIT_ASSERT( in.get() ); wxStringOutputStream out; CPPUNIT_ASSERT_EQUAL( wxSTREAM_EOF, in->Read(out).GetLastError() );