[Avida-cvs] [avida-svn] r664 - in development/source: analyze classification
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon May 8 16:59:08 PDT 2006
Author: kaben
Date: 2006-05-08 19:59:07 -0400 (Mon, 08 May 2006)
New Revision: 664
Modified:
development/source/analyze/cAnalyzeGenotype.h
development/source/analyze/cAnalyzeJob.h
development/source/analyze/cAnalyzeJobQueue.h
development/source/analyze/cAnalyzeJobWorker.h
development/source/analyze/cAnalyzeUtil.h
development/source/analyze/cGenotypeBatch.h
development/source/classification/cClassificationManager.h
development/source/classification/cGenotype.h
development/source/classification/cGenotypeControl.h
development/source/classification/cGenotype_BirthData.h
development/source/classification/cGenotype_TestData.h
development/source/classification/cInjectGenotype.h
development/source/classification/cInjectGenotypeControl.h
Log:
Moving class' UnitTests functions to corresponding namespaces.
Modified: development/source/analyze/cAnalyzeGenotype.h
===================================================================
--- development/source/analyze/cAnalyzeGenotype.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/analyze/cAnalyzeGenotype.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -314,16 +314,17 @@
equality of two references means that they refer to the same object.
*/
bool operator==(const cAnalyzeGenotype &in) const { return &in == this; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nAnalyzeGenotype {
/**
* 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/analyze/cAnalyzeJob.h
===================================================================
--- development/source/analyze/cAnalyzeJob.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/analyze/cAnalyzeJob.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -25,17 +25,18 @@
int GetID() { return m_id; }
virtual void Run(cAvidaContext& ctx) = 0;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nAnalyzeJob {
/**
* 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/analyze/cAnalyzeJobQueue.h
===================================================================
--- development/source/analyze/cAnalyzeJobQueue.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/analyze/cAnalyzeJobQueue.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -52,17 +52,18 @@
void Execute();
cRandom* GetRandom(int jobid) { return m_rng_pool[jobid & MT_RANDOM_INDEX_MASK]; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nAnalyzeJobQueue {
/**
* 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/analyze/cAnalyzeJobWorker.h
===================================================================
--- development/source/analyze/cAnalyzeJobWorker.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/analyze/cAnalyzeJobWorker.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -26,17 +26,18 @@
public:
cAnalyzeJobWorker(cAnalyzeJobQueue* queue) : m_queue(queue) { ; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nAnalyzeJobWorker {
/**
* 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/analyze/cAnalyzeUtil.h
===================================================================
--- development/source/analyze/cAnalyzeUtil.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/analyze/cAnalyzeUtil.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -69,16 +69,17 @@
// this adds support for evan dorn's InstructionHistogramEvent. -- kgn
static void PrintInstructionAbundanceHistogram(cWorld* world, std::ofstream& fp);
// -- kgn
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nAnalyzeUtil {
/**
* 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/analyze/cGenotypeBatch.h
===================================================================
--- development/source/analyze/cGenotypeBatch.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/analyze/cGenotypeBatch.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -42,17 +42,18 @@
void SetLineage(bool _val=true) { is_lineage = _val; }
void SetAligned(bool _val=true) { is_aligned = _val; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nGenotypeBatch {
/**
* 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/classification/cClassificationManager.h
===================================================================
--- development/source/classification/cClassificationManager.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/classification/cClassificationManager.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -184,17 +184,18 @@
bool SaveClone(std::ofstream& fp);
bool LoadClone(std::ifstream & fp);
bool OK();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nClassificationManager {
/**
* 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/classification/cGenotype.h
===================================================================
--- development/source/classification/cGenotype.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/classification/cGenotype.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -221,18 +221,19 @@
int GetNumOrganisms() { return num_organisms; }
int GetTotalOrganisms() { return total_organisms; }
int GetTotalParasites() { return total_parasites; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nGenotype {
/**
* 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 int cGenotype::AddOrganism()
Modified: development/source/classification/cGenotypeControl.h
===================================================================
--- development/source/classification/cGenotypeControl.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/classification/cGenotypeControl.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -66,17 +66,18 @@
{ return threads[thread] = historic_list; }
cGenotype * Next(int thread);
cGenotype * Prev(int thread);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nGenotypeControl {
/**
* 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/classification/cGenotype_BirthData.h
===================================================================
--- development/source/classification/cGenotype_BirthData.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/classification/cGenotype_BirthData.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -48,17 +48,18 @@
// population, otherwise:
// [0]=parent1, [1]=parent2, [2]&[3]=grandparents 1, [4]&[5]=grandparents 2
tArray<int> ancestor_ids;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nGenotype_BirthData {
/**
* 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/classification/cGenotype_TestData.h
===================================================================
--- development/source/classification/cGenotype_TestData.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/classification/cGenotype_TestData.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -25,17 +25,18 @@
int copied_size;
double colony_fitness;
int generations;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nGenotype_TestData {
/**
* 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/classification/cInjectGenotype.h
===================================================================
--- development/source/classification/cInjectGenotype.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/classification/cInjectGenotype.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -110,18 +110,19 @@
int RemoveParasite();
int GetNumInjected() { return num_injected; }
int GetTotalInjected() { return total_injected; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nInjectGenotype {
/**
* 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 cInjectGenotype::SetThreshold()
Modified: development/source/classification/cInjectGenotypeControl.h
===================================================================
--- development/source/classification/cInjectGenotypeControl.h 2006-05-08 23:53:50 UTC (rev 663)
+++ development/source/classification/cInjectGenotypeControl.h 2006-05-08 23:59:07 UTC (rev 664)
@@ -64,17 +64,18 @@
{ return threads[thread] = historic_list; }
cInjectGenotype * Next(int thread);
cInjectGenotype * Prev(int thread);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nInjectGenotypeControl {
/**
* 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