[Avida-cvs] [avida-svn] r667 - in development/source: drivers event main

kaben@myxo.css.msu.edu kaben at myxo.css.msu.edu
Mon May 8 17:15:43 PDT 2006


Author: kaben
Date: 2006-05-08 20:15:43 -0400 (Mon, 08 May 2006)
New Revision: 667

Modified:
   development/source/drivers/cDefaultAnalyzeDriver.h
   development/source/drivers/cDefaultRunDriver.h
   development/source/drivers/cDriverManager.h
   development/source/drivers/cFallbackWorldDriver.h
   development/source/drivers/cWorldDriver.h
   development/source/event/cEvent.h
   development/source/event/cEventList.h
   development/source/event/cEventListEntry.h
   development/source/event/cEventListIterator.h
   development/source/event/cEventManager.h
   development/source/event/cEventTriggers.h
   development/source/main/MyCodeArrayLessThan.h
Log:

Moving class' UnitTests functions to corresponding namespaces.



Modified: development/source/drivers/cDefaultAnalyzeDriver.h
===================================================================
--- development/source/drivers/cDefaultAnalyzeDriver.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/drivers/cDefaultAnalyzeDriver.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -47,17 +47,18 @@
   // Notifications
   void NotifyComment(const cString& in_string);
   void NotifyWarning(const cString& in_string);
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nDefaultAnalyzeDriver {
   /**
    * 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

Modified: development/source/drivers/cDefaultRunDriver.h
===================================================================
--- development/source/drivers/cDefaultRunDriver.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/drivers/cDefaultRunDriver.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -47,17 +47,18 @@
   // Notifications
   void NotifyComment(const cString& in_string);
   void NotifyWarning(const cString& in_string);
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nDefaultRunDriver {
   /**
    * 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

Modified: development/source/drivers/cDriverManager.h
===================================================================
--- development/source/drivers/cDriverManager.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/drivers/cDriverManager.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -46,17 +46,18 @@
 
   static void Unregister(cAvidaDriver* drv);
   static void Unregister(cWorldDriver* drv);
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nDriverManager {
   /**
    * 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

Modified: development/source/drivers/cFallbackWorldDriver.h
===================================================================
--- development/source/drivers/cFallbackWorldDriver.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/drivers/cFallbackWorldDriver.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -37,17 +37,18 @@
   // Notifications
   void NotifyComment(const cString& in_string);
   void NotifyWarning(const cString& in_string);
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nFallbackWorldDriver {
   /**
    * 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

Modified: development/source/drivers/cWorldDriver.h
===================================================================
--- development/source/drivers/cWorldDriver.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/drivers/cWorldDriver.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -35,17 +35,18 @@
   // Notifications
   virtual void NotifyComment(const cString& in_string) = 0;
   virtual void NotifyWarning(const cString& in_string) = 0;
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nWorldDriver {
   /**
    * 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

Modified: development/source/event/cEvent.h
===================================================================
--- development/source/event/cEvent.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/event/cEvent.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -55,17 +55,6 @@
   // Name and description of the event
   virtual const cString GetName() const = 0;
   virtual const cString GetDescription() const = 0;
-
-
-#ifdef ENABLE_UNIT_TESTS
-public:
-  /**
-   * Run unit tests
-   *
-   * @param full Run full test suite; if false, just the fast tests.
-   **/
-  static void UnitTests(bool full = false);
-#endif  
 };
 
 #endif

Modified: development/source/event/cEventList.h
===================================================================
--- development/source/event/cEventList.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/event/cEventList.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -135,17 +135,18 @@
   // kaben changed this member function to static for easy access by
   // cEventListIterator.
   static void PrintEvent(cEventListEntry * event, std::ostream& os = std::cout);
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nEventList {
   /**
    * 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

Modified: development/source/event/cEventListEntry.h
===================================================================
--- development/source/event/cEventListEntry.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/event/cEventListEntry.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -103,17 +103,18 @@
 
   cEventListEntry*  GetPrev()     const { return m_prev; }
   cEventListEntry*  GetNext()     const { return m_next; }
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nEventListEntry {
   /**
    * 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

Modified: development/source/event/cEventListIterator.h
===================================================================
--- development/source/event/cEventListIterator.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/event/cEventListIterator.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -42,17 +42,18 @@
     m_node = m_node->GetNext();
     return *this;
   }
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nEventListIterator {
   /**
    * 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

Modified: development/source/event/cEventManager.h
===================================================================
--- development/source/event/cEventManager.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/event/cEventManager.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -35,17 +35,18 @@
   cEvent* ConstructEvent(const cString name, const cString& args);
   
   void PrintAllEventDescriptions();
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nEventManager {
   /**
    * 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

Modified: development/source/event/cEventTriggers.h
===================================================================
--- development/source/event/cEventTriggers.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/event/cEventTriggers.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -38,17 +38,18 @@
   virtual double GetGeneration() const = 0;
 
   double GetTriggerValue( eTriggerVariable trigger ) const;
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nEventTriggers {
   /**
    * 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

Modified: development/source/main/MyCodeArrayLessThan.h
===================================================================
--- development/source/main/MyCodeArrayLessThan.h	2006-05-09 00:11:07 UTC (rev 666)
+++ development/source/main/MyCodeArrayLessThan.h	2006-05-09 00:15:43 UTC (rev 667)
@@ -19,17 +19,18 @@
 {
 public:
   bool operator()(const cMxCodeArray& x, const cMxCodeArray& y) const { return x < y; }
+};
 
 
 #ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMyCodeArrayLessThan {
   /**
    * 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