[Avida-cvs] [avida-svn] r659 - in development/source: testsuites tools

kaben@myxo.css.msu.edu kaben at myxo.css.msu.edu
Mon May 8 13:50:38 PDT 2006


Author: kaben
Date: 2006-05-08 16:50:38 -0400 (Mon, 08 May 2006)
New Revision: 659

Modified:
   development/source/testsuites/full-unit-tests.cc
   development/source/tools/cStringList.cc
   development/source/tools/cStringList.h
Log:

Moved cStringList's UnitTests to namespace nStringList.



Modified: development/source/testsuites/full-unit-tests.cc
===================================================================
--- development/source/testsuites/full-unit-tests.cc	2006-05-08 20:48:28 UTC (rev 658)
+++ development/source/testsuites/full-unit-tests.cc	2006-05-08 20:50:38 UTC (rev 659)
@@ -14,7 +14,7 @@
   nInitFile::UnitTests(true);
   nRandom::UnitTests(true);
   nString::UnitTests(true);
-  cStringList::UnitTests(true);
+  nStringList::UnitTests(true);
   cTemplateTests::UnitTests(true);
 
   return boost::report_errors();

Modified: development/source/tools/cStringList.cc
===================================================================
--- development/source/tools/cStringList.cc	2006-05-08 20:48:28 UTC (rev 658)
+++ development/source/tools/cStringList.cc	2006-05-08 20:50:38 UTC (rev 659)
@@ -88,7 +88,7 @@
 #include <fstream> 
 #include <string>
 
-namespace nStringListTests {
+namespace nStringList {
   /*
   Test-helpers.
   */
@@ -175,18 +175,20 @@
       std::remove(filename.c_str());
     }
   } // utStringList_archiving
-} // nStringListTests
 
-void cStringList::UnitTests(bool full)
-{
-  //if(full) {
-  //  std::cout << "nStringListTests::utStringList_hello_world" << std::endl;
-  //  nStringListTests::utStringList_hello_world::test();
-  //}
-  if(full) {
-    std::cout << "nStringListTests::utStringList_archiving" << std::endl;
-    nStringListTests::utStringList_archiving::test();
+
+
+  void UnitTests(bool full)
+  {
+    //if(full) {
+    //  std::cout << "utStringList_hello_world" << std::endl;
+    //  utStringList_hello_world::test();
+    //}
+    if(full) {
+      std::cout << "utStringList_archiving" << std::endl;
+      utStringList_archiving::test();
+    }
   }
-}
+} // nStringList
 
 #endif // ENABLE_UNIT_TESTS

Modified: development/source/tools/cStringList.h
===================================================================
--- development/source/tools/cStringList.h	2006-05-08 20:48:28 UTC (rev 658)
+++ development/source/tools/cStringList.h	2006-05-08 20:50:38 UTC (rev 659)
@@ -71,17 +71,18 @@
   void serialize(Archive & a, const unsigned int version){
     a.ArkvObj("string_list", string_list);
   } 
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nStringList {
   /**
    * Run unit tests
    *
    * @param full Run full test suite; if false, just the fast tests.
    **/
-  static void UnitTests(bool full = false);
+  void UnitTests(bool full = false);
+}
 #endif  
-};
 
 #endif




More information about the Avida-cvs mailing list