virtual void SetUp() { myArray->push( 80 ); myArray->push( 4 ); myArray1->push( 80 ); myArray1->push( 2 ); myArray1->popFront(); myArray1->push( 5 ); myArray1->push( 4 ); myArray1->push( 100 ); myArray1->push( 8 ); myArray1->push( 3 ); for( int i = 0; i < 12; i++ ) { myArray2->pushFront( i ); } for( int i = 0; i < 11; i++ ) { myArray3->push( 2 ); } //myArray4=myArray; // this functionality mostly works, but has memory leaks }
TEST( DynamicArray, popFront ) { StevensDev::sgdc::DynamicArray<int> array; array.push(0); array.push(1); array.push(2); array.push(3); array.push(4); array.push(5); array.push(6); array.push(7); array.push(8); array.push(9); array.push(10); EXPECT_EQ( 0, array.popFront() ); EXPECT_EQ( 1, array.popFront() ); EXPECT_EQ( 2, array.popFront() ); }