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

Removed arrayLength. Defined A2_ARRAY_LEN as macro to calculate
	size of array at compile time.
	* src/array_fun.h
	* test/BitfieldManTest.cc
	* test/BtPortMessageTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DownloadHelperTest.cc
	* test/LongestSequencePieceSelectorTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/OptionParserTest.cc
	* test/PriorityPieceSelectorTest.cc
	* test/array_funTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2010-03-25 14:22:43 +00:00
parent f15d22b619
commit 886f8ee58e
12 changed files with 41 additions and 31 deletions

View file

@ -67,8 +67,8 @@ void array_funTest::testArrayLength()
int64_t ia[] = { 1, 2, 3, 4, 5 };
int64_t zeroLengthArray[] = {};
CPPUNIT_ASSERT_EQUAL((size_t)5, arrayLength(ia));
CPPUNIT_ASSERT_EQUAL((size_t)0, arrayLength(zeroLengthArray));
CPPUNIT_ASSERT_EQUAL((size_t)5, A2_ARRAY_LEN(ia));
CPPUNIT_ASSERT_EQUAL((size_t)0, A2_ARRAY_LEN(zeroLengthArray));
}
// Check operator[] in const context.