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

kaben@myxo.css.msu.edu kaben at myxo.css.msu.edu
Mon May 8 13:22:11 PDT 2006


Author: kaben
Date: 2006-05-08 16:22:11 -0400 (Mon, 08 May 2006)
New Revision: 654

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

Tried moving cInitFile's UnitTest function from class to namespace.



Modified: development/source/testsuites/cInitFile-unit-tests.cc
===================================================================
--- development/source/testsuites/cInitFile-unit-tests.cc	2006-05-08 20:21:19 UTC (rev 653)
+++ development/source/testsuites/cInitFile-unit-tests.cc	2006-05-08 20:22:11 UTC (rev 654)
@@ -9,7 +9,7 @@
 
 int main() {
 
-  cInitFile::UnitTests(true);
+  nInitFile::UnitTests(true);
 
   return boost::report_errors();
 }

Modified: development/source/testsuites/full-unit-tests.cc
===================================================================
--- development/source/testsuites/full-unit-tests.cc	2006-05-08 20:21:19 UTC (rev 653)
+++ development/source/testsuites/full-unit-tests.cc	2006-05-08 20:22:11 UTC (rev 654)
@@ -11,7 +11,7 @@
 
   cDataEntry::UnitTests(true);
   cFile::UnitTests(true);
-  cInitFile::UnitTests(true);
+  nInitFile::UnitTests(true);
   cRandom::UnitTests(true);
   cString::UnitTests(true);
   cStringList::UnitTests(true);

Modified: development/source/tools/cInitFile.cc
===================================================================
--- development/source/tools/cInitFile.cc	2006-05-08 20:21:19 UTC (rev 653)
+++ development/source/tools/cInitFile.cc	2006-05-08 20:22:11 UTC (rev 654)
@@ -426,24 +426,33 @@
   } // utInitFile_ReadString_after_open_and_close
 } // nInitFileTests
 
-void cInitFile::UnitTests(bool full)
-{
-  //if(full) {
-  //  std::cout << "nInitFileTests::utInitFile_hello_world" << std::endl;
-  //  nInitFileTests::utInitFile_hello_world::test();
-  //}
-  if(full) {
-    std::cout << "nInitFileTests::utInitFile_archiving" << std::endl;
-    nInitFileTests::utInitFile_archiving::test();
+namespace nInitFile {
+/*
+
+};
+
+  UnitTests()
+
+*/
+  void UnitTests(bool full)
+  {
+    //if(full) {
+    //  std::cout << "nInitFileTests::utInitFile_hello_world" << std::endl;
+    //  nInitFileTests::utInitFile_hello_world::test();
+    //}
+    if(full) {
+      std::cout << "nInitFileTests::utInitFile_archiving" << std::endl;
+      nInitFileTests::utInitFile_archiving::test();
+    }
+    if(full) {
+      std::cout << "nInitFileTests::utInitFile_archiving_closed_file" << std::endl;
+      nInitFileTests::utInitFile_archiving_closed_file::test();
+    }
+    if(1) {
+      std::cout << "nInitFileTests::utInitFile_ReadString_after_open_and_close" << std::endl;
+      nInitFileTests::utInitFile_ReadString_after_open_and_close::test();
+    }
   }
-  if(full) {
-    std::cout << "nInitFileTests::utInitFile_archiving_closed_file" << std::endl;
-    nInitFileTests::utInitFile_archiving_closed_file::test();
-  }
-  if(1) {
-    std::cout << "nInitFileTests::utInitFile_ReadString_after_open_and_close" << std::endl;
-    nInitFileTests::utInitFile_ReadString_after_open_and_close::test();
-  }
 }
 
 #endif // ENABLE_UNIT_TESTS

Modified: development/source/tools/cInitFile.h
===================================================================
--- development/source/tools/cInitFile.h	2006-05-08 20:21:19 UTC (rev 653)
+++ development/source/tools/cInitFile.h	2006-05-08 20:22:11 UTC (rev 654)
@@ -208,15 +208,17 @@
   }
 
 
+};
+
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nInitFile {
   /**
    * 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