[Avida-cvs] [avida-svn] r669 - development/source/main
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon May 8 17:20:31 PDT 2006
Author: kaben
Date: 2006-05-08 20:20:31 -0400 (Mon, 08 May 2006)
New Revision: 669
Modified:
development/source/main/cInstLibBase.h
development/source/main/cInstSet.h
development/source/main/cInstUtil.h
development/source/main/cInstruction.h
development/source/main/cLandscape.h
development/source/main/cLocalMutations.h
development/source/main/cMutation.h
development/source/main/cMutationLib.h
Log:
Moving class' UnitTests functions to corresponding namespaces.
Modified: development/source/main/cInstLibBase.h
===================================================================
--- development/source/main/cInstLibBase.h 2006-05-09 00:17:58 UTC (rev 668)
+++ development/source/main/cInstLibBase.h 2006-05-09 00:20:31 UTC (rev 669)
@@ -31,17 +31,6 @@
virtual cInstruction GetInst(const cString & in_name) = 0;
virtual const cInstruction & GetInstDefault() = 0;
virtual const cInstruction & GetInstError() = 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/cInstSet.h
===================================================================
--- development/source/main/cInstSet.h 2006-05-09 00:17:58 UTC (rev 668)
+++ development/source/main/cInstSet.h 2006-05-09 00:20:31 UTC (rev 669)
@@ -168,18 +168,19 @@
return inst_error2;
}
// static const cInstruction & GetInstNone() { return inst_none; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nInstSet {
/**
* 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 cInstruction cInstSet::GetInst(const cString & in_name) const
Modified: development/source/main/cInstUtil.h
===================================================================
--- development/source/main/cInstUtil.h 2006-05-09 00:17:58 UTC (rev 668)
+++ development/source/main/cInstUtil.h 2006-05-09 00:20:31 UTC (rev 669)
@@ -43,17 +43,18 @@
// ========= Genome Construction =========
static cGenome RandomGenome(cAvidaContext& ctx, int length, const cInstSet & inst_set);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nInstUtil {
/**
* 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/cInstruction.h
===================================================================
--- development/source/main/cInstruction.h 2006-05-09 00:17:58 UTC (rev 668)
+++ development/source/main/cInstruction.h 2006-05-09 00:20:31 UTC (rev 669)
@@ -41,17 +41,18 @@
// Some extra methods to convert too and from alpha-numeric symbols...
char GetSymbol() const;
void SetSymbol(char symbol);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nInstruction {
/**
* 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/cLandscape.h
===================================================================
--- development/source/main/cLandscape.h 2006-05-09 00:17:58 UTC (rev 668)
+++ development/source/main/cLandscape.h 2006-05-09 00:20:31 UTC (rev 669)
@@ -198,17 +198,18 @@
inline int GetNumTrials() const { return trials; }
inline double GetTotalEntropy() const { return total_entropy; }
inline double GetComplexity() const { return complexity; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nLandscape {
/**
* 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/cLocalMutations.h
===================================================================
--- development/source/main/cLocalMutations.h 2006-05-09 00:17:58 UTC (rev 668)
+++ development/source/main/cLocalMutations.h 2006-05-09 00:20:31 UTC (rev 669)
@@ -38,17 +38,18 @@
void IncCount(int id) { counts[id]++; }
void IncCount(int id, int num_mut) { counts[id] += num_mut; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nLocalMutations {
/**
* 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/cMutation.h
===================================================================
--- development/source/main/cMutation.h 2006-05-09 00:17:58 UTC (rev 668)
+++ development/source/main/cMutation.h 2006-05-09 00:20:31 UTC (rev 669)
@@ -47,17 +47,18 @@
equality of two references means that they refer to the same object.
*/
bool operator==(const cMutation &in) const { return &in == this; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMutation {
/**
* 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/cMutationLib.h
===================================================================
--- development/source/main/cMutationLib.h 2006-05-09 00:17:58 UTC (rev 668)
+++ development/source/main/cMutationLib.h 2006-05-09 00:20:31 UTC (rev 669)
@@ -41,17 +41,18 @@
const tArray<cMutation*>& GetMutationArray() const { return mutation_array; }
const tList<cMutation>& GetMutationList(int trigger) const { return trigger_list_array[trigger]; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMutationLib {
/**
* 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