Added testGetFront
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/test/FTList-Test.cpp b/test/FTList-Test.cpp
index 6d27e62..99d8d1d 100755
--- a/test/FTList-Test.cpp
+++ b/test/FTList-Test.cpp
@@ -14,6 +14,7 @@ class FTListTest : public CppUnit::TestCase
CPPUNIT_TEST( testConstructor);
CPPUNIT_TEST( testPushBack);
CPPUNIT_TEST( testGetBack);
+ CPPUNIT_TEST( testGetFront);
CPPUNIT_TEST_SUITE_END();
public:
@@ -46,17 +47,28 @@ class FTListTest : public CppUnit::TestCase
void testGetBack()
{
- FTList<float> listOfFloats;
-
- listOfFloats.push_back( 0.1);
- listOfFloats.push_back( 1.2);
- listOfFloats.push_back( 2.3);
+ FTList<int> listOfIntegers;
- std::cout << listOfFloats.back() << std::endl;
- CPPUNIT_ASSERT( listOfFloats.back() == 2.3);
+ listOfIntegers.push_back( 0);
+ listOfIntegers.push_back( 1);
+ listOfIntegers.push_back( 2);
+
+ CPPUNIT_ASSERT( listOfIntegers.back() == 2);
}
+ void testGetFront()
+ {
+ FTList<char> listOfChars;
+
+ listOfChars.push_back( 'a');
+ listOfChars.push_back( 'b');
+ listOfChars.push_back( 'c');
+
+ CPPUNIT_ASSERT( listOfChars.front() == 'a');
+ }
+
+
void setUp()
{}