2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Added vbegin() and vend() for fixed sized array.
	* src/DownloadHandlerConstants.cc
	* src/FeatureConfig.cc
	* src/OptionHandlerFactory.cc
	* src/ServerStat.cc
	* src/TimeA2.cc
	* src/XmlRpcMethod.cc
	* src/array_fun.h
	* src/download_helper.cc
	* src/messageDigest.cc
	* src/util.cc
	* test/BittorrentHelperTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/DownloadContextTest.cc
	* test/DownloadHelperTest.cc
	* test/FeatureConfigTest.cc
	* test/FeedbackURISelectorTest.cc
	* test/HttpRequestTest.cc
	* test/InOrderURISelectorTest.cc
	* test/MSEHandshakeTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/PriorityPieceSelectorTest.cc
	* test/RequestGroupManTest.cc
	* test/UtilTest.cc
	* test/XmlRpcMethodTest.cc
	* test/a2algoTest.cc
	* test/array_funTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2010-03-25 13:51:10 +00:00
parent 8477e463e9
commit f15d22b619
31 changed files with 120 additions and 91 deletions

View file

@ -26,7 +26,7 @@ void a2algoTest::testSelect()
{
size_t A[] = { 1,2,3,4,7,10,11,12,13,14,15,100,112,113,114 };
std::pair<size_t*, size_t> p = max_sequence(&A[0], &A[arrayLength(A)]);
std::pair<size_t*, size_t> p = max_sequence(vbegin(A), vend(A));
CPPUNIT_ASSERT_EQUAL(&A[5], p.first);
CPPUNIT_ASSERT_EQUAL((size_t)6, p.second);