[Avida-cvs] [avida-svn] r673 - in development/source: cpu targets/avida-viewer tools
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon May 8 17:55:53 PDT 2006
Author: kaben
Date: 2006-05-08 20:55:53 -0400 (Mon, 08 May 2006)
New Revision: 673
Modified:
development/source/cpu/cTestCPU.h
development/source/targets/avida-viewer/cBarScreen.h
development/source/targets/avida-viewer/cBaseTextWindow.h
development/source/targets/avida-viewer/cEnvironmentScreen.h
development/source/targets/avida-viewer/cHistScreen.h
development/source/targets/avida-viewer/cMapScreen.h
development/source/targets/avida-viewer/cMenuWindow.h
development/source/targets/avida-viewer/cOptionsScreen.h
development/source/targets/avida-viewer/cScreen.h
development/source/targets/avida-viewer/cStatsScreen.h
development/source/targets/avida-viewer/cSymbolUtil.h
development/source/targets/avida-viewer/cTextViewerDriver.h
development/source/targets/avida-viewer/cTextWindow.h
development/source/targets/avida-viewer/cView.h
development/source/targets/avida-viewer/cViewInfo.h
development/source/targets/avida-viewer/cZoomScreen.h
development/source/tools/cHelpFullEntry.h
development/source/tools/cHelpManager.h
development/source/tools/cHelpType.h
development/source/tools/cHistogram.h
development/source/tools/cID.h
development/source/tools/cIndexedBlockStruct.h
development/source/tools/cIntSum.h
development/source/tools/cIntegratedSchedule.h
development/source/tools/cIntegratedScheduleNode.h
development/source/tools/cMerit.h
development/source/tools/cMessageClass.h
development/source/tools/cMessageClosure.h
development/source/tools/cMessageDisplay.h
development/source/tools/cMessageType.h
development/source/tools/cProbSchedule.h
development/source/tools/cRefBlock.h
development/source/tools/cRunningAverage.h
development/source/tools/cScaledBlock.h
development/source/tools/cSchedule.h
development/source/tools/cStringIterator.h
development/source/tools/cStringUtil.h
development/source/tools/cThread.h
development/source/tools/cTools.h
development/source/tools/cUInt.h
development/source/tools/cVerifierSuiteRecurser.h
development/source/tools/cWeightedIndex.h
Log:
Moving class' UnitTests functions to corresponding namespaces.
Modified: development/source/cpu/cTestCPU.h
===================================================================
--- development/source/cpu/cTestCPU.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/cpu/cTestCPU.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -51,7 +51,7 @@
*
* @param full Run full test suite; if false, just the fast tests.
**/
- static void UnitTests(bool full = false);
+ void UnitTests(bool full = false);
}
#endif
@@ -103,7 +103,7 @@
*
* @param full Run full test suite; if false, just the fast tests.
**/
- static void UnitTests(bool full = false);
+ void UnitTests(bool full = false);
}
#endif
Modified: development/source/targets/avida-viewer/cBarScreen.h
===================================================================
--- development/source/targets/avida-viewer/cBarScreen.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cBarScreen.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -28,17 +28,18 @@
void Draw();
void Update();
void DoInput(int in_char) { (void) in_char; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nBarScreen {
/**
* 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/targets/avida-viewer/cBaseTextWindow.h
===================================================================
--- development/source/targets/avida-viewer/cBaseTextWindow.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cBaseTextWindow.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -35,18 +35,19 @@
int GetY() { return y; }
void Set(int _x, int _y) { x = _x; y = _y; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nBaseTextWindow {
/**
* 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
-};
class cBaseTextWindow {
Modified: development/source/targets/avida-viewer/cEnvironmentScreen.h
===================================================================
--- development/source/targets/avida-viewer/cEnvironmentScreen.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cEnvironmentScreen.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -42,17 +42,18 @@
void DrawReaction();
void UpdateResource();
void UpdateReaction();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nEnvironmentScreen {
/**
* 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/targets/avida-viewer/cHistScreen.h
===================================================================
--- development/source/targets/avida-viewer/cHistScreen.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cHistScreen.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -41,17 +41,18 @@
void Draw();
void Update();
void DoInput(int in_char);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nHistScreen {
/**
* 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/targets/avida-viewer/cMapScreen.h
===================================================================
--- development/source/targets/avida-viewer/cMapScreen.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cMapScreen.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -41,18 +41,19 @@
// Virtual in map screen.
void Navigate();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMapScreen {
/**
* 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/targets/avida-viewer/cMenuWindow.h
===================================================================
--- development/source/targets/avida-viewer/cMenuWindow.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cMenuWindow.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -42,17 +42,18 @@
int Activate();
inline void SetActive(int in_id) { active_id = in_id; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMenuWindow {
/**
* 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/targets/avida-viewer/cOptionsScreen.h
===================================================================
--- development/source/targets/avida-viewer/cOptionsScreen.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cOptionsScreen.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -24,17 +24,18 @@
void Draw();
void Update();
void DoInput(int in_char) { (void) in_char; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nOptionsScreen {
/**
* 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/targets/avida-viewer/cScreen.h
===================================================================
--- development/source/targets/avida-viewer/cScreen.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cScreen.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -77,18 +77,19 @@
virtual void DoInput(int in_char) = 0;
virtual void DoMouseClick(int x, int y) { (void) x; (void) y; }
virtual void Exit() { ; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace cScreen {
/**
* 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 cScreen::SetSymbolColor(char color)
Modified: development/source/targets/avida-viewer/cStatsScreen.h
===================================================================
--- development/source/targets/avida-viewer/cStatsScreen.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cStatsScreen.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -32,17 +32,18 @@
void Draw();
void Update();
void DoInput(int in_char);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nStatsScreen {
/**
* 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/targets/avida-viewer/cSymbolUtil.h
===================================================================
--- development/source/targets/avida-viewer/cSymbolUtil.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cSymbolUtil.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -22,17 +22,18 @@
static char GetMutSymbol( const cPopulationCell & cell );
static char GetThreadSymbol(const cPopulationCell & cell);
static char GetLineageSymbol( const cPopulationCell & cell );
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nSymbolUtil {
/**
* 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/targets/avida-viewer/cTextViewerDriver.h
===================================================================
--- development/source/targets/avida-viewer/cTextViewerDriver.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cTextViewerDriver.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -48,17 +48,18 @@
// Notifications
void NotifyComment(const cString& in_string);
void NotifyWarning(const cString& in_string);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nTextViewerDriver {
/**
* 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/targets/avida-viewer/cTextWindow.h
===================================================================
--- development/source/targets/avida-viewer/cTextWindow.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cTextWindow.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -132,17 +132,18 @@
inline void SetBoldColor(int color) {
wattrset(win_id, COLOR_PAIR(color) | A_BOLD);
}
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nTextWindow {
/**
* 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/targets/avida-viewer/cView.h
===================================================================
--- development/source/targets/avida-viewer/cView.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cView.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -87,17 +87,18 @@
// Methods called by sub-windows.
static void Redraw();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nView {
/**
* 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/targets/avida-viewer/cViewInfo.h
===================================================================
--- development/source/targets/avida-viewer/cViewInfo.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cViewInfo.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -125,18 +125,19 @@
void SetPauseLevel(int in_level) { pause_level = in_level; }
void SetThreadLock(int in_lock) { thread_lock = in_lock; }
void SetStepOrganism(int in_id) { step_organism_id = in_id; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nViewInfo {
/**
* 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 cViewInfo::DecMapMode()
{
Modified: development/source/targets/avida-viewer/cZoomScreen.h
===================================================================
--- development/source/targets/avida-viewer/cZoomScreen.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/targets/avida-viewer/cZoomScreen.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -128,17 +128,18 @@
// Other misc functions...
void AdvanceUpdate() { memory_offset = 0; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nZoomScreen {
/**
* 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/tools/cHelpFullEntry.h
===================================================================
--- development/source/tools/cHelpFullEntry.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cHelpFullEntry.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -42,17 +42,18 @@
cHelpType* GetType() const { return type; }
bool IsAlias() const { return false; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nHelpFullEntry {
/**
* 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/tools/cHelpManager.h
===================================================================
--- development/source/tools/cHelpManager.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cHelpManager.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -53,17 +53,18 @@
void SetVerbose(bool _verbose = true) { verbose = _verbose; }
bool GetVerbose() const { return verbose; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nHelpManager {
/**
* 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/tools/cHelpType.h
===================================================================
--- development/source/tools/cHelpType.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cHelpType.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -42,17 +42,18 @@
cHelpEntry * FindEntry(const cString & entry_name);
void PrintHTML();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nHelpType {
/**
* 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/tools/cHistogram.h
===================================================================
--- development/source/tools/cHistogram.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cHistogram.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -54,18 +54,19 @@
inline int GetMinBin() { return min_bin; }
inline int GetMaxBin() { return max_bin; }
inline int GetNumBins() { return max_bin - min_bin + 1; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nHistogram {
/**
* 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 cHistogram::Clear()
{
Modified: development/source/tools/cID.h
===================================================================
--- development/source/tools/cID.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cID.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -41,17 +41,18 @@
bool operator>=(const cID &rhs) const { return this >= &rhs; }
bool operator==(const cID &rhs) const { return this == &rhs; }
bool operator!=(const cID &rhs) const { return this != &rhs; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nID {
/**
* 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/tools/cIndexedBlockStruct.h
===================================================================
--- development/source/tools/cIndexedBlockStruct.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cIndexedBlockStruct.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -103,18 +103,19 @@
}
else fixed_size = 1;
}
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nIndexedBlockStruct {
/**
* 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 cIndexedBlockStruct::Find(cFixedCoords & search_coords) const
{
Modified: development/source/tools/cIntSum.h
===================================================================
--- development/source/tools/cIntSum.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cIntSum.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -78,17 +78,18 @@
s3 -= w_val * w_val * w_val;
s4 -= w_val * w_val * w_val * w_val;
}
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nIntSum {
/**
* 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/tools/cIntegratedSchedule.h
===================================================================
--- development/source/tools/cIntegratedSchedule.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cIntegratedSchedule.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -56,17 +56,18 @@
double GetStatus(int id);
bool OK();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nIntegratedSchedule {
/**
* 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/tools/cIntegratedScheduleNode.h
===================================================================
--- development/source/tools/cIntegratedScheduleNode.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cIntegratedScheduleNode.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -81,17 +81,18 @@
inline int GetProcessCount() { return process_count; }
inline cIntegratedScheduleNode * GetNext() { return next; }
inline cIntegratedScheduleNode * GetPrev() { return prev; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nIntegratedScheduleNode {
/**
* 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/tools/cMerit.h
===================================================================
--- development/source/tools/cMerit.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cMerit.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -79,18 +79,19 @@
return ( gestation_time != 0 ) ? value / ((double) gestation_time) : 0; }
std::ostream& BinaryPrint(std::ostream& os = std::cout) const ;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMerit {
/**
* 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
-};
std::ostream& operator<<(std::ostream& os, const cMerit & merit);
Modified: development/source/tools/cMessageClass.h
===================================================================
--- development/source/tools/cMessageClass.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cMessageClass.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -33,18 +33,19 @@
bool const m_no_prefix;
private:
bool _configured;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMessageClass {
/**
* 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
-};
/*
Declaration of the five message classes.
Modified: development/source/tools/cMessageClosure.h
===================================================================
--- development/source/tools/cMessageClosure.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cMessageClosure.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -89,18 +89,19 @@
cMessageClosure &va(const char *fmt, ...);
private:
void prefix(void);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMessageClosure {
/**
* 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
-};
/*
you probably don't need to change these macros...
Modified: development/source/tools/cMessageDisplay.h
===================================================================
--- development/source/tools/cMessageDisplay.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cMessageDisplay.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -31,18 +31,19 @@
virtual void out(cString &final_msg){}
virtual void abort(){ abort(); }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMessageDisplay {
/**
* 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
-};
void setInfoDisplay(cMessageDisplay &info);
void setDebugDisplay(cMessageDisplay &debug);
Modified: development/source/tools/cMessageType.h
===================================================================
--- development/source/tools/cMessageType.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cMessageType.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -21,17 +21,18 @@
bool m_is_active;
cMessageType(const char* type_name, cMessageClass& message_class);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nMessageType {
/**
* 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/tools/cProbSchedule.h
===================================================================
--- development/source/tools/cProbSchedule.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cProbSchedule.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -44,17 +44,18 @@
void Adjust(int item_id, const cMerit& merit);
int GetNextID();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nProbSchedule {
/**
* 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/tools/cRefBlock.h
===================================================================
--- development/source/tools/cRefBlock.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cRefBlock.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -39,17 +39,18 @@
ref_num = in_block.GetRef();
size = in_block.GetSize();
}
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nRefBlock {
/**
* 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/tools/cRunningAverage.h
===================================================================
--- development/source/tools/cRunningAverage.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cRunningAverage.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -56,17 +56,18 @@
// Notation Shortcuts
double Ave() const { return Average(); }
double Var() const { return Variance(); }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nRunningAverage {
/**
* 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/tools/cScaledBlock.h
===================================================================
--- development/source/tools/cScaledBlock.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cScaledBlock.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -44,17 +44,18 @@
data = in_block.GetData();
size = in_block.GetSize();
}
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nScaledBlock {
/**
* 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/tools/cSchedule.h
===================================================================
--- development/source/tools/cSchedule.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cSchedule.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -43,17 +43,18 @@
cChangeList *GetChangeList() { return m_change_list; }
void SetSize(int _item_count);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nSchedule {
/**
* 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/tools/cStringIterator.h
===================================================================
--- development/source/tools/cStringIterator.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cStringIterator.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -44,17 +44,18 @@
const cString & Prev() { list_it.Prev(); return Get(); }
bool AtRoot() const { return list_it.AtRoot(); }
bool AtEnd() const { return list_it.AtEnd(); }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nStringIterator {
/**
* 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/tools/cStringUtil.h
===================================================================
--- development/source/tools/cStringUtil.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cStringUtil.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -59,17 +59,18 @@
static cString Convert(bool in_bool);
static cString Convert(int in_int);
static cString Convert(double in_double);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nStringUtil {
/**
* 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/tools/cThread.h
===================================================================
--- development/source/tools/cThread.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cThread.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -37,17 +37,18 @@
int Start();
void Stop();
void Join();
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nThread {
/**
* 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/tools/cTools.h
===================================================================
--- development/source/tools/cTools.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cTools.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -24,17 +24,18 @@
public:
static bool MkDir(const cString& dirname, bool verbose=false);
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nTools {
/**
* 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/tools/cUInt.h
===================================================================
--- development/source/tools/cUInt.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cUInt.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -187,17 +187,6 @@
inline int operator>=(const cUInt& in_cUInt) const {
return (value >= in_cUInt.AsLong());
}
-
-
-#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
};
@@ -792,4 +781,16 @@
#endif
+
+#ifdef ENABLE_UNIT_TESTS
+namespace nUInt {
+ /**
+ * Run unit tests
+ *
+ * @param full Run full test suite; if false, just the fast tests.
+ **/
+ void UnitTests(bool full = false);
+}
#endif
+
+#endif
Modified: development/source/tools/cVerifierSuiteRecurser.h
===================================================================
--- development/source/tools/cVerifierSuiteRecurser.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cVerifierSuiteRecurser.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -43,17 +43,18 @@
cVerifierSuiteRecurser(bool recurse): m_cyck(recurse) {}
public:
cCycleCheck m_cyck;
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nVerifierSuiteRecurser {
/**
* 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/tools/cWeightedIndex.h
===================================================================
--- development/source/tools/cWeightedIndex.h 2006-05-09 00:36:28 UTC (rev 672)
+++ development/source/tools/cWeightedIndex.h 2006-05-09 00:55:53 UTC (rev 673)
@@ -49,17 +49,18 @@
int GetParent(int id) { return (id-1) / 2; }
int GetLeftChild(int id) { return 2*id + 1; }
int GetRightChild(int id) { return 2*id + 2; }
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nWeightedIndex {
/**
* 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