[Avida-cvs] [avida-svn] r670 - development/source/main
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon May 8 17:24:41 PDT 2006
Author: kaben
Date: 2006-05-08 20:24:41 -0400 (Mon, 08 May 2006)
New Revision: 670
Modified:
development/source/main/cMutationRates.h
development/source/main/cMxCodeArray.h
development/source/main/cOrgInterface.h
development/source/main/cOrgMessage.h
development/source/main/cOrgSeqMessage.h
development/source/main/cOrgSinkMessage.h
development/source/main/cOrgSourceMessage.h
development/source/main/cOrganism.h
development/source/main/cPhenotype.h
development/source/main/cPopulation.h
development/source/main/cPopulationCell.h
Log:
Moving class' UnitTests functions to corresponding namespaces.
Modified: development/source/main/cMutationRates.h
===================================================================
--- development/source/main/cMutationRates.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cMutationRates.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -93,17 +93,18 @@
void SetParentMutProb(double in_prob) { divide.parent_mut_prob = in_prob; }
void SetCrossoverProb(double in_prob) { divide.crossover_prob = in_prob; }
void SetAlignedCrossProb(double in) { divide.aligned_cross_prob = in; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMutationRates {
/**
* 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/cMxCodeArray.h
===================================================================
--- development/source/main/cMxCodeArray.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cMxCodeArray.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -112,18 +112,19 @@
int HammingDistance(const cMxCodeArray &other_gene) const;
double TransitionProbability(const cMxCodeArray &other_gene, double errorRate) const;
void PrintTransitionList(std::ostream& fp, int size) const;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMxCodeArray {
/**
* 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
-};
cInstruction & cMxCodeArray::operator[](int index)
{
Modified: development/source/main/cOrgInterface.h
===================================================================
--- development/source/main/cOrgInterface.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cOrgInterface.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -51,17 +51,6 @@
virtual int ReceiveValue() = 0;
virtual bool InjectParasite(cOrganism* parent, const cGenome& injected_code) = 0;
virtual bool UpdateMerit(double new_merit) = 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/main/cOrgMessage.h
===================================================================
--- development/source/main/cOrgMessage.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cOrgMessage.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -38,17 +38,18 @@
void GetData(std::string & in_data) { in_data=data; }
void GetData(int & in_data);
void GetData(double & in_data);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nOrgMessage {
/**
* 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/cOrgSeqMessage.h
===================================================================
--- development/source/main/cOrgSeqMessage.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cOrgSeqMessage.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -24,17 +24,18 @@
void SetReceived() { m_recvd = true; }
bool GetReceived() { return m_recvd; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nOrgSeqMessage {
/**
* 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/cOrgSinkMessage.h
===================================================================
--- development/source/main/cOrgSinkMessage.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cOrgSinkMessage.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -29,17 +29,18 @@
void SetValidated() { m_validated = true; }
bool GetValidated() { return m_validated; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nOrgSinkMessage {
/**
* 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/cOrgSourceMessage.h
===================================================================
--- development/source/main/cOrgSourceMessage.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cOrgSourceMessage.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -30,17 +30,18 @@
void SetDropped() { m_dropped++; }
int GetCorrupted() { return m_corrupt; }
void SetCorrupted() { m_corrupt++; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nOrgSourceMessage {
/**
* 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/cOrganism.h
===================================================================
--- development/source/main/cOrganism.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cOrganism.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -259,18 +259,19 @@
// Other Special Functions
void Fault(int fault_loc, int fault_type, cString fault_desc="");
-
+};
+
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nOrganism {
/**
* 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/cPhenotype.h
===================================================================
--- development/source/main/cPhenotype.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cPhenotype.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -280,17 +280,18 @@
int& CrossNum() { assert(initialized == true); return cross_num; }
bool& ChildFertile() { assert(initialized == true); return child_fertile; }
bool& IsMultiThread() { assert(initialized == true); return is_multi_thread; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nPhenotype {
/**
* 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/cPopulation.h
===================================================================
--- development/source/main/cPopulation.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cPopulation.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -186,17 +186,18 @@
void SetChangeList(cChangeList* change_list);
cChangeList* GetChangeList();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nPopulation {
/**
* 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/cPopulationCell.h
===================================================================
--- development/source/main/cPopulationCell.h 2006-05-09 00:20:31 UTC (rev 669)
+++ development/source/main/cPopulationCell.h 2006-05-09 00:24:41 UTC (rev 670)
@@ -70,17 +70,18 @@
bool IsOccupied() const { return organism != NULL; }
bool OK();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nPopulationCell {
/**
* 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