From 7e6db8d801973bfc62b80f411f14d1d332a1f7aa Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 3 Jul 2013 23:23:22 +0900 Subject: Use std::unique_ptr instead of array_ptr --- test/array_funTest.cc | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'test/array_funTest.cc') diff --git a/test/array_funTest.cc b/test/array_funTest.cc index 1158d577..ae796c8c 100644 --- a/test/array_funTest.cc +++ b/test/array_funTest.cc @@ -11,7 +11,6 @@ class array_funTest:public CppUnit::TestFixture { CPPUNIT_TEST(testArray_negate); CPPUNIT_TEST(testArray_and); CPPUNIT_TEST(testArrayLength); - CPPUNIT_TEST(testArrayPtr); CPPUNIT_TEST(testArrayWrapper); CPPUNIT_TEST_SUITE_END(); @@ -21,7 +20,6 @@ public: void testArray_negate(); void testArray_and(); void testArrayLength(); - void testArrayPtr(); void testArrayWrapper(); struct X{ @@ -70,15 +68,6 @@ void array_funTest::testArrayLength() // CPPUNIT_ASSERT_EQUAL((size_t)0, A2_ARRAY_LEN(zeroLengthArray)); } -namespace { -// Check operator[] in const context. -void arrayPtrConst(const array_ptr& ax) -{ - CPPUNIT_ASSERT_EQUAL(100, ax[3].m); - CPPUNIT_ASSERT_EQUAL(99, ax[2].m); -} -} // namespace - namespace { void arrayPtrCast(struct array_funTest::X* x) {} } // namespace @@ -87,19 +76,6 @@ namespace { void arrayPtrConstCast(const struct array_funTest::X* x) {} } // namespace -void array_funTest::testArrayPtr() -{ - array_ptr ax(new struct X[10]); - ax[3].m = 100; - ax[2].m = 99; - CPPUNIT_ASSERT_EQUAL(100, ax[3].m); - CPPUNIT_ASSERT_EQUAL(99, ax[2].m); - arrayPtrConst(ax); - - arrayPtrCast(ax); - arrayPtrConstCast(ax); -} - namespace { void arrayWrapperConst(const array_wrapper& array) { -- cgit