mirror of
https://github.com/aria2/aria2.git
synced 2026-04-05 04:08:47 +00:00
2008-11-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Applied aria2-1.0.1-mingw.patch. Use SOCKET_ERRNO instead of errno if the code is used both linux and mingw. Collected 4th and 5th argument types for getsockopt and setsockopt. * src/SocketCore.cc * src/a2netcompat.h * test/SocketCoreTest.cc
This commit is contained in:
@@ -9,6 +9,7 @@ class SocketCoreTest:public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE(SocketCoreTest);
|
||||
CPPUNIT_TEST(testWriteAndReadDatagram);
|
||||
CPPUNIT_TEST(testGetSocketError);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
void setUp() {}
|
||||
@@ -16,6 +17,7 @@ public:
|
||||
void tearDown() {}
|
||||
|
||||
void testWriteAndReadDatagram();
|
||||
void testGetSocketError();
|
||||
};
|
||||
|
||||
|
||||
@@ -59,4 +61,12 @@ void SocketCoreTest::testWriteAndReadDatagram()
|
||||
}
|
||||
}
|
||||
|
||||
void SocketCoreTest::testGetSocketError()
|
||||
{
|
||||
SocketCore s;
|
||||
s.bind(0);
|
||||
// See there is no error at this point
|
||||
CPPUNIT_ASSERT_EQUAL(std::string(""), s.getSocketError());
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
||||
Reference in New Issue
Block a user