@@ -214,41 +214,41 @@ TEST(ArrayListTest, ExportMemoryTransfersOwnership) {
214214}
215215
216216TEST (ArrayListTest, ContainerInterface) {
217- ArrayList<int > list;
218- list.add (10 );
219- list.add (20 );
220- list.add (30 );
217+ ArrayList<int > list;
218+ list.add (10 );
219+ list.add (20 );
220+ list.add (30 );
221221
222- Container<int , int &, int *, const int *>* container = &list;
223- EXPECT_EQ (container->getElement (0 ), 10 );
224- EXPECT_EQ (container->getElement (1 ), 20 );
225- EXPECT_EQ (container->getElement (2 ), 30 );
222+ Container<int , int &, int *, const int *>* container = &list;
223+ EXPECT_EQ (container->getElement (0 ), 10 );
224+ EXPECT_EQ (container->getElement (1 ), 20 );
225+ EXPECT_EQ (container->getElement (2 ), 30 );
226226
227- EXPECT_EQ (container->find (20 ), 1 );
228- EXPECT_EQ (container->find (40 ), -1 );
227+ EXPECT_EQ (container->find (20 ), 1 );
228+ EXPECT_EQ (container->find (40 ), -1 );
229229}
230230
231231TEST (ArrayListTest, ReverseIteration) {
232- ArrayList<int > list{1 , 2 , 3 , 4 , 5 };
233- ArrayList<int > expected{5 , 4 , 3 , 2 , 1 };
234-
235- int count = 0 ;
236- for (ArrayList<int >::reverse_iterator it = list.rbegin (); it != list.rend (); ++it) {
237- EXPECT_EQ (*it, expected.get (count));
238- count++;
239- }
240- EXPECT_EQ (count, 5 );
232+ ArrayList<int > list{1 , 2 , 3 , 4 , 5 };
233+ ArrayList<int > expected{5 , 4 , 3 , 2 , 1 };
234+
235+ int count = 0 ;
236+ for (ArrayList<int >::reverse_iterator it = list.rbegin (); it != list.rend (); ++it) {
237+ EXPECT_EQ (*it, expected.get (count));
238+ count++;
239+ }
240+ EXPECT_EQ (count, 5 );
241241}
242242
243243TEST (ArrayListTest, ConstReverseIteration) {
244- ArrayList<int > list{1 , 2 , 3 };
245- const ArrayList<int >& clist = list;
246-
247- ArrayList<int > expected{3 , 2 , 1 };
248- int count = 0 ;
249- for (ArrayList<int >::const_reverse_iterator it = clist.crbegin (); it != clist.crend (); ++it) {
250- EXPECT_EQ (*it, expected.get (count));
251- count++;
252- }
253- EXPECT_EQ (count, 3 );
244+ ArrayList<int > list{1 , 2 , 3 };
245+ const ArrayList<int >& clist = list;
246+
247+ ArrayList<int > expected{3 , 2 , 1 };
248+ int count = 0 ;
249+ for (ArrayList<int >::const_reverse_iterator it = clist.crbegin (); it != clist.crend (); ++it) {
250+ EXPECT_EQ (*it, expected.get (count));
251+ count++;
252+ }
253+ EXPECT_EQ (count, 3 );
254254}
0 commit comments