[Avida-cvs] [avida-svn] r656 - in development/source: testsuites tools
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon May 8 13:36:52 PDT 2006
Author: kaben
Date: 2006-05-08 16:36:52 -0400 (Mon, 08 May 2006)
New Revision: 656
Modified:
development/source/testsuites/full-unit-tests.cc
development/source/tools/cDataEntry.cc
development/source/tools/cFile.cc
development/source/tools/cFile.h
development/source/tools/cInitFile.cc
Log:
* Moved cFile's UnitTests function to namespace nFile.
* Cosmetic cleanup of output of some unit tests.
Modified: development/source/testsuites/full-unit-tests.cc
===================================================================
--- development/source/testsuites/full-unit-tests.cc 2006-05-08 20:32:21 UTC (rev 655)
+++ development/source/testsuites/full-unit-tests.cc 2006-05-08 20:36:52 UTC (rev 656)
@@ -10,7 +10,7 @@
int main() {
nDataEntry::UnitTests(true);
- cFile::UnitTests(true);
+ nFile::UnitTests(true);
nInitFile::UnitTests(true);
cRandom::UnitTests(true);
cString::UnitTests(true);
Modified: development/source/tools/cDataEntry.cc
===================================================================
--- development/source/tools/cDataEntry.cc 2006-05-08 20:32:21 UTC (rev 655)
+++ development/source/tools/cDataEntry.cc 2006-05-08 20:36:52 UTC (rev 656)
@@ -88,7 +88,6 @@
void UnitTests(bool full)
{
- std::cout << "nDataEntry::UnitTests" << std::endl;
//if(full) {
// std::cout << "utDataEntry_hello_world" << std::endl;
// utDataEntry_hello_world::test();
Modified: development/source/tools/cFile.cc
===================================================================
--- development/source/tools/cFile.cc 2006-05-08 20:32:21 UTC (rev 655)
+++ development/source/tools/cFile.cc 2006-05-08 20:36:52 UTC (rev 656)
@@ -93,7 +93,7 @@
#include <fstream>
#include <string>
-namespace nFileTests {
+namespace nFile {
/*
Test-helpers.
*/
@@ -209,22 +209,26 @@
std::remove(data_file_name.c_str());
}
} // utFile_archiving_closed_file
-} // nFileTests
-void cFile::UnitTests(bool full)
-{
- //if(full) {
- // std::cout << "nFileTests::utFile_hello_world" << std::endl;
- // nFileTests::utFile_hello_world::test();
- //}
- if(full) {
- std::cout << "nFileTests::utFile_archiving" << std::endl;
- nFileTests::utFile_archiving::test();
+
+
+
+
+ void UnitTests(bool full)
+ {
+ //if(full) {
+ // std::cout << "utFile_hello_world" << std::endl;
+ // utFile_hello_world::test();
+ //}
+ if(full) {
+ std::cout << "utFile_archiving" << std::endl;
+ utFile_archiving::test();
+ }
+ if(full) {
+ std::cout << "utFile_archiving_closed_file" << std::endl;
+ utFile_archiving_closed_file::test();
+ }
}
- if(full) {
- std::cout << "nFileTests::utFile_archiving_closed_file" << std::endl;
- nFileTests::utFile_archiving_closed_file::test();
- }
-}
+} // nFile
#endif // ENABLE_UNIT_TESTS
Modified: development/source/tools/cFile.h
===================================================================
--- development/source/tools/cFile.h 2006-05-08 20:32:21 UTC (rev 655)
+++ development/source/tools/cFile.h 2006-05-08 20:36:52 UTC (rev 656)
@@ -153,16 +153,17 @@
a.SplitLoadSave(*this, version);
}
+};
#ifdef ENABLE_UNIT_TESTS
-public:
+namespace nFile {
/**
* 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/cInitFile.cc
===================================================================
--- development/source/tools/cInitFile.cc 2006-05-08 20:32:21 UTC (rev 655)
+++ development/source/tools/cInitFile.cc 2006-05-08 20:36:52 UTC (rev 656)
@@ -430,7 +430,6 @@
void UnitTests(bool full)
{
- std::cout << "nInitFile::UnitTests" << std::endl;
//if(full) {
// std::cout << "utInitFile_hello_world" << std::endl;
// utInitFile_hello_world::test();
More information about the Avida-cvs
mailing list