[Avida-cvs] [avida-svn] r668 - development/source/main
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon May 8 17:17:59 PDT 2006
Author: kaben
Date: 2006-05-08 20:17:58 -0400 (Mon, 08 May 2006)
New Revision: 668
Modified:
development/source/main/cAvidaConfig.h
development/source/main/cAvidaTriggers.h
development/source/main/cBirthChamber.h
development/source/main/cEnvironment.h
development/source/main/cFitnessMatrix.h
development/source/main/cGenome.h
development/source/main/cGenomeUtil.h
Log:
Moving class' UnitTests functions to corresponding namespaces.
Modified: development/source/main/cAvidaConfig.h
===================================================================
--- development/source/main/cAvidaConfig.h 2006-05-09 00:15:43 UTC (rev 667)
+++ development/source/main/cAvidaConfig.h 2006-05-09 00:17:58 UTC (rev 668)
@@ -272,18 +272,19 @@
void Status();
void GenerateOverides();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nAvidaConfig {
/**
* 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
-};
// Concept:
// Setup #define to build class that will manage the specific variable inside
Modified: development/source/main/cAvidaTriggers.h
===================================================================
--- development/source/main/cAvidaTriggers.h 2006-05-09 00:15:43 UTC (rev 667)
+++ development/source/main/cAvidaTriggers.h 2006-05-09 00:17:58 UTC (rev 668)
@@ -37,17 +37,18 @@
double GetUpdate() const { return (double) m_stats.GetUpdate(); }
double GetGeneration() const { return m_stats.SumGeneration().Average(); }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nAvidaTriggers {
/**
* 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/cBirthChamber.h
===================================================================
--- development/source/main/cBirthChamber.h 2006-05-09 00:15:43 UTC (rev 667)
+++ development/source/main/cBirthChamber.h 2006-05-09 00:17:58 UTC (rev 668)
@@ -102,17 +102,18 @@
// Check the neighborhood for waiting genomes
bool GetNeighborWaiting(const int & parent_id, int world_x, int world_y);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nBirthChamber {
/**
* 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/cEnvironment.h
===================================================================
--- development/source/main/cEnvironment.h 2006-05-09 00:15:43 UTC (rev 667)
+++ development/source/main/cEnvironment.h 2006-05-09 00:17:58 UTC (rev 668)
@@ -120,17 +120,18 @@
bool SetReactionValue(const cString & name, double value);
bool SetReactionValueMult(const cString & name, double value_mult);
bool SetReactionInst(const cString & name, cString inst_name);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nEnvironment {
/**
* 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/cFitnessMatrix.h
===================================================================
--- development/source/main/cFitnessMatrix.h 2006-05-09 00:15:43 UTC (rev 667)
+++ development/source/main/cFitnessMatrix.h 2006-05-09 00:17:58 UTC (rev 668)
@@ -150,17 +150,18 @@
* vector?
**/
void CalcFitnessMatrix( int depth_limit, double fitness_threshold_ratio, int ham_thresh, double error_rate_min, double error_rate_max, double error_rate_step, double vect_fmax, double vect_fstep, int diag_iters, bool write_ham_vector, bool write_full_vector );
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nFitnessMatrix {
/**
* 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/cGenome.h
===================================================================
--- development/source/main/cGenome.h 2006-05-09 00:15:43 UTC (rev 667)
+++ development/source/main/cGenome.h 2006-05-09 00:17:58 UTC (rev 668)
@@ -56,17 +56,18 @@
int GetSize() const { return active_size; }
cString AsString() const;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nGenome {
/**
* 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/cGenomeUtil.h
===================================================================
--- development/source/main/cGenomeUtil.h 2006-05-09 00:15:43 UTC (rev 667)
+++ development/source/main/cGenomeUtil.h 2006-05-09 00:17:58 UTC (rev 668)
@@ -41,17 +41,18 @@
static cGenome Crop(const cGenome& genome, int start, int end);
static cGenome Cut(const cGenome& genome, int start, int end);
static cGenome Join(const cGenome& genome1, const cGenome& genome2);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nGenomeUtil {
/**
* 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