Commit eda2bbb56e64771a5bee017714fa82685c974f41

henry 2002-12-20T22:22:26

Added testGetFront

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() 
         {}