[Avida-cvs] [avida-svn] r671 - development/source/main
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon May 8 17:29:14 PDT 2006
Author: kaben
Date: 2006-05-08 20:29:14 -0400 (Mon, 08 May 2006)
New Revision: 671
Modified:
development/source/main/cPopulationInterface.h
development/source/main/cReaction.h
development/source/main/cReactionLib.h
development/source/main/cReactionProcess.h
development/source/main/cReactionRequisite.h
development/source/main/cReactionResult.h
development/source/main/cResource.h
development/source/main/cResourceCount.h
development/source/main/cResourceLib.h
development/source/main/cSpatialCountElem.h
development/source/main/cSpatialResCount.h
development/source/main/cStats.h
development/source/main/cTaskContext.h
development/source/main/cTaskEntry.h
Log:
Moving class' UnitTests functions to corresponding namespaces.
Modified: development/source/main/cPopulationInterface.h
===================================================================
--- development/source/main/cPopulationInterface.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cPopulationInterface.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -60,17 +60,18 @@
int ReceiveValue();
bool InjectParasite(cOrganism* parent, const cGenome& injected_code);
bool UpdateMerit(double new_merit);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nPopulationInterface {
/**
* 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/cReaction.h
===================================================================
--- development/source/main/cReaction.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cReaction.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -61,17 +61,18 @@
bool ModifyInst(int inst_id, int process_num = 0);
double GetValue(int process_num = 0);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nReaction {
/**
* 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/cReactionLib.h
===================================================================
--- development/source/main/cReactionLib.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cReactionLib.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -35,17 +35,18 @@
cReaction* AddReaction(const cString& name);
cReaction* GetReaction(const cString& name) const;
cReaction* GetReaction(int id) const;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nReactionLib {
/**
* Run unit tests
*
* @param full Run full test suite; if false, just the fast tests.
**/
- static void UnitTests(bool full = false);
-#endif
-};
+ void UnitTests(bool full = false);
+}
+#endif
#endif
Modified: development/source/main/cReactionProcess.h
===================================================================
--- development/source/main/cReactionProcess.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cReactionProcess.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -98,17 +98,18 @@
void SetDetectionThreshold(double _in) { detection_threshold = _in; }
void SetDetectionError(double _in) { detection_error = _in; }
void SetMatchString(cString _in) { match_string = _in; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nReactionProcess {
/**
* 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/cReactionRequisite.h
===================================================================
--- development/source/main/cReactionRequisite.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cReactionRequisite.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -52,17 +52,18 @@
equality of two references means that they refer to the same object.
*/
bool operator==(const cReactionRequisite& in) const { return &in == this; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nReactionRequisite {
/**
* Run unit tests
*
* @param full Run full test suite; if false, just the fast tests.
**/
- static void UnitTests(bool full = false);
-#endif
-};
+ void UnitTests(bool full = false);
+}
+#endif
#endif
Modified: development/source/main/cReactionResult.h
===================================================================
--- development/source/main/cReactionResult.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cReactionResult.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -67,17 +67,18 @@
double GetAddBonus() { return bonus_add; }
double GetMultBonus() { return bonus_mult; }
tArray<int>& GetInstArray() { return insts_triggered; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nReactionResult {
/**
* 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/cResource.h
===================================================================
--- development/source/main/cResource.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cResource.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -80,17 +80,18 @@
void SetXGravity(double _xgravity) { xgravity = _xgravity; }
void SetYDiffuse(double _ydiffuse) { ydiffuse = _ydiffuse; }
void SetYGravity(double _ygravity) { ygravity = _ygravity; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nResource {
/**
* 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/cResourceCount.h
===================================================================
--- development/source/main/cResourceCount.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cResourceCount.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -79,17 +79,18 @@
}
void ResizeSpatialGrids(int in_x, int in_y);
cSpatialResCount GetSpatialResource(int id) { return spatial_resource_count[id]; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nResourceCount {
/**
* 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/cResourceLib.h
===================================================================
--- development/source/main/cResourceLib.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cResourceLib.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -35,17 +35,18 @@
cResource* AddResource(const cString& res_name);
cResource* GetResource(const cString& res_name) const;
cResource* GetResource(int id) const;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nResourceLib {
/**
* 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/cSpatialCountElem.h
===================================================================
--- development/source/main/cSpatialCountElem.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cSpatialCountElem.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -36,17 +36,18 @@
double GetPtrDist(int innum) { return dist[innum]; }
friend void FlowMatter(cSpatialCountElem&, cSpatialCountElem&, double, double, double, double,
int, int, double);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nSpatialCountElem {
/**
* 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/cSpatialResCount.h
===================================================================
--- development/source/main/cSpatialResCount.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cSpatialResCount.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -66,17 +66,18 @@
void SetOutflowX2(int in_outflowX2) { outflowX2 = in_outflowX2; }
void SetOutflowY1(int in_outflowY1) { outflowY1 = in_outflowY1; }
void SetOutflowY2(int in_outflowY2) { outflowY2 = in_outflowY2; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nSpatialResCount {
/**
* 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/cStats.h
===================================================================
--- development/source/main/cStats.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cStats.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -548,18 +548,19 @@
void PrintMutationRateData(const cString& filename);
void PrintInstructionData(const cString& filename);
void PrintGenotypeMap(const cString& filename);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nStats {
/**
* 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
-};
inline void cStats::SetNumGenotypes(int new_genotypes)
Modified: development/source/main/cTaskContext.h
===================================================================
--- development/source/main/cTaskContext.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cTaskContext.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -37,17 +37,18 @@
other_output_buffers(other_outputs), net_valid(in_net_valid), net_completed(in_net_completed), logic_id(0)
{
}
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nTaskContext {
/**
* 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/cTaskEntry.h
===================================================================
--- development/source/main/cTaskEntry.h 2006-05-09 00:24:41 UTC (rev 670)
+++ development/source/main/cTaskEntry.h 2006-05-09 00:29:14 UTC (rev 671)
@@ -44,17 +44,18 @@
const int GetID() const { return m_id; }
const tTaskTest GetTestFun() const { return m_test_fun; }
const cString & GetInfo() const { return m_info; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nTaskEntry {
/**
* 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