diff --git a/ChangeLog b/ChangeLog index 46bf8b2e..546917c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-16 Tatsuhiro Tsujikawa + + Applied Ross's aria2-0.13.2+1-mingw-3.patch. + * test/HttpHeaderTest.cc: Casted to off_t where it should. + * test/HttpRequestTest.cc: Casted to off_t where it should. + 2008-06-16 Tatsuhiro Tsujikawa Applied Ross's aria2-0.13.2+1-mingw.patch and diff --git a/test/HttpHeaderTest.cc b/test/HttpHeaderTest.cc index 4ce7d096..c377e54c 100644 --- a/test/HttpHeaderTest.cc +++ b/test/HttpHeaderTest.cc @@ -28,9 +28,9 @@ void HttpHeaderTest::testGetRange() SharedHandle range = httpHeader.getRange(); - CPPUNIT_ASSERT_EQUAL(9223372036854775800LL, range->getStartByte()); - CPPUNIT_ASSERT_EQUAL(9223372036854775801LL, range->getEndByte()); - CPPUNIT_ASSERT_EQUAL(9223372036854775807ULL, range->getEntityLength()); + CPPUNIT_ASSERT_EQUAL((off_t)9223372036854775800LL, range->getStartByte()); + CPPUNIT_ASSERT_EQUAL((off_t)9223372036854775801LL, range->getEndByte()); + CPPUNIT_ASSERT_EQUAL((uint64_t)9223372036854775807ULL, range->getEntityLength()); } { HttpHeader httpHeader; @@ -39,9 +39,9 @@ void HttpHeaderTest::testGetRange() SharedHandle range = httpHeader.getRange(); - CPPUNIT_ASSERT_EQUAL(9223372036854775800LL, range->getStartByte()); - CPPUNIT_ASSERT_EQUAL(9223372036854775801LL, range->getEndByte()); - CPPUNIT_ASSERT_EQUAL(9223372036854775807ULL, range->getEntityLength()); + CPPUNIT_ASSERT_EQUAL((off_t)9223372036854775800LL, range->getStartByte()); + CPPUNIT_ASSERT_EQUAL((off_t)9223372036854775801LL, range->getEndByte()); + CPPUNIT_ASSERT_EQUAL((uint64_t)9223372036854775807ULL, range->getEntityLength()); } } diff --git a/test/HttpRequestTest.cc b/test/HttpRequestTest.cc index 3b2a3c34..fead309f 100644 --- a/test/HttpRequestTest.cc +++ b/test/HttpRequestTest.cc @@ -54,11 +54,11 @@ void HttpRequestTest::testGetStartByte() SharedHandle p(new Piece(1, 1024)); SharedHandle segment(new PiecedSegment(1024, p)); - CPPUNIT_ASSERT_EQUAL(0LL, httpRequest.getStartByte()); + CPPUNIT_ASSERT_EQUAL((off_t)0LL, httpRequest.getStartByte()); httpRequest.setSegment(segment); - CPPUNIT_ASSERT_EQUAL(1024LL, httpRequest.getStartByte()); + CPPUNIT_ASSERT_EQUAL((off_t)1024LL, httpRequest.getStartByte()); } @@ -72,11 +72,11 @@ void HttpRequestTest::testGetEndByte() SharedHandle piece(new Piece(index, length)); SharedHandle segment(new PiecedSegment(segmentLength, piece)); - CPPUNIT_ASSERT_EQUAL(0LL, httpRequest.getEndByte()); + CPPUNIT_ASSERT_EQUAL((off_t)0LL, httpRequest.getEndByte()); httpRequest.setSegment(segment); - CPPUNIT_ASSERT_EQUAL(0LL, httpRequest.getEndByte()); + CPPUNIT_ASSERT_EQUAL((off_t)0LL, httpRequest.getEndByte()); SharedHandle request(new Request()); request->supportsPersistentConnection(true); @@ -84,13 +84,13 @@ void HttpRequestTest::testGetEndByte() httpRequest.setRequest(request); - CPPUNIT_ASSERT_EQUAL((off_t)segmentLength*index+length-1, + CPPUNIT_ASSERT_EQUAL((off_t)(segmentLength*index+length-1), httpRequest.getEndByte()); request->setPipeliningHint(false); - CPPUNIT_ASSERT_EQUAL(0LL, httpRequest.getEndByte()); + CPPUNIT_ASSERT_EQUAL((off_t)0LL, httpRequest.getEndByte()); } void HttpRequestTest::testCreateRequest()