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:
Tatsuhiro Tsujikawa
2008-11-26 12:50:07 +00:00
parent e074d93348
commit 72d523b990
4 changed files with 40 additions and 19 deletions

View File

@@ -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