mirror of https://github.com/aria2/aria2
				
				
				
			2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all changes in the patch were applied. * test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW. * test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW. * test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.pull/1/head
							parent
							
								
									2c02415f97
								
							
						
					
					
						commit
						8989ffb6c5
					
				|  | @ -1,3 +1,11 @@ | |||
| 2008-06-16  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com> | ||||
| 
 | ||||
| 	Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all | ||||
| 	changes in the patch were applied. | ||||
| 	* test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW. | ||||
| 	* test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW. | ||||
| 	* test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW. | ||||
| 	 | ||||
| 2008-06-16  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com> | ||||
| 
 | ||||
| 	Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change, | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| #include "DHTConnectionImpl.h" | ||||
| #include "Exception.h" | ||||
| #include "SocketCore.h" | ||||
| #include <iostream> | ||||
| #include <cppunit/extensions/HelperMacros.h> | ||||
| 
 | ||||
|  | @ -40,6 +41,7 @@ void DHTConnectionImplTest::testWriteAndReadData() | |||
|     std::string remoteHost; | ||||
|     uint16_t remotePort; | ||||
|     { | ||||
|       while(!con2.getSocket()->isReadable(0)); | ||||
|       ssize_t rlength = con2.receiveMessage(readbuffer, sizeof(readbuffer), remoteHost, remotePort); | ||||
|       CPPUNIT_ASSERT_EQUAL((ssize_t)message1.size(), rlength); | ||||
|       CPPUNIT_ASSERT_EQUAL(message1, | ||||
|  |  | |||
|  | @ -124,8 +124,13 @@ void DefaultPieceStorageTest::testCompletePiece() { | |||
|   peer->setAllBitfield(); | ||||
| 
 | ||||
|   SharedHandle<Piece> piece = pss.getMissingPiece(peer); | ||||
| #ifdef __MINGW32__ | ||||
|   CPPUNIT_ASSERT_EQUAL(std::string("piece: index=2, length=128"), | ||||
| 		       piece->toString()); | ||||
| #else // !__MINGW32__
 | ||||
|   CPPUNIT_ASSERT_EQUAL(std::string("piece: index=0, length=128"), | ||||
| 		       piece->toString()); | ||||
| #endif // !__MINGW32__
 | ||||
| 
 | ||||
|   CPPUNIT_ASSERT_EQUAL(0ULL, pss.getCompletedLength()); | ||||
| 
 | ||||
|  |  | |||
|  | @ -42,7 +42,9 @@ void createNLengthMessage(char* msg, int msgLen, int payloadLen, int id) { | |||
| void PeerMessageUtilTest::testCreateCompact() | ||||
| { | ||||
|   unsigned char compact[6]; | ||||
|   CPPUNIT_ASSERT(PeerMessageUtil::createcompact(compact, "::ffff:127.0.0.1", 6881)); | ||||
|   // Note: PeerMessageUtil::createcompact() on linux can handle IPv4-mapped
 | ||||
|   // addresses like `ffff::127.0.0.1', but on cygwin, it doesn't.
 | ||||
|   CPPUNIT_ASSERT(PeerMessageUtil::createcompact(compact, "127.0.0.1", 6881)); | ||||
| 
 | ||||
|   std::pair<std::string, uint16_t> p = PeerMessageUtil::unpackcompact(compact); | ||||
|   CPPUNIT_ASSERT_EQUAL(std::string("127.0.0.1"), p.first); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Tatsuhiro Tsujikawa
						Tatsuhiro Tsujikawa