From c4c27907ed689764bf21846617db9e385bc81a1c Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 7 Nov 2010 23:09:35 +0100 Subject: [PATCH] remove unused test binaries, some code formating --- eo/test/t-eo.cpp | 16 ++++------------ eo/test/t-eoCheckpointing.cpp | 9 --------- eo/test/t-eoEasyEA.cpp | 9 --------- eo/test/t-eoEasyPSO.cpp | 1 - eo/test/t-eoFunctor.cpp | 2 +- eo/test/t-eoLogger.cpp | 12 ++++++------ 6 files changed, 11 insertions(+), 38 deletions(-) diff --git a/eo/test/t-eo.cpp b/eo/test/t-eo.cpp index 2e4cf4e7..22fcb5be 100644 --- a/eo/test/t-eo.cpp +++ b/eo/test/t-eo.cpp @@ -1,23 +1,15 @@ -//----------------------------------------------------------------------------- -// t-eo.cpp -//----------------------------------------------------------------------------- - -#include // EO - -//----------------------------------------------------------------------------- +#include typedef EO Chrom; -//----------------------------------------------------------------------------- int main() { Chrom chrom1, chrom2; + // EO objects can be printed with stream operators std::cout << "chrom1 = " << chrom1 << std::endl - << "chrom2 = " << chrom2 << std::endl; - - + << "chrom2 = " << chrom2 << std::endl; + return 0; } -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 11d5d593..5562ccb0 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -1,4 +1,3 @@ -//----------------------------------------------------------------------------- // to avoid long name warnings #ifdef _MSC_VER @@ -7,19 +6,12 @@ #include // runtime_error -//----------------------------------------------------------------------------- -// tt.cpp: -// -//----------------------------------------------------------------------------- - - // general #include // Random number generators #include #include #include #include -//----------------------------------------------------------------------------- // include package checkpointing #include @@ -36,7 +28,6 @@ public : eoDummyPop(int s = 2) { resize(s); } }; -//----------------------------------------------------------------------------- int the_main(int argc, char **argv) { // ok, we have a command line parser and a state diff --git a/eo/test/t-eoEasyEA.cpp b/eo/test/t-eoEasyEA.cpp index 1b201cfa..afda2362 100644 --- a/eo/test/t-eoEasyEA.cpp +++ b/eo/test/t-eoEasyEA.cpp @@ -1,7 +1,3 @@ -//----------------------------------------------------------------------------- -// t-eoEasyEA.cpp -//----------------------------------------------------------------------------- - #ifndef __GNUG__ // to avoid long name warnings #pragma warning(disable:4786) @@ -11,12 +7,8 @@ #include "binary_value.h" -//----------------------------------------------------------------------------- - typedef eoBin Chrom; -//----------------------------------------------------------------------------- - main() { const unsigned POP_SIZE = 8, CHROM_SIZE = 16; @@ -81,4 +73,3 @@ main() return 0; } -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoEasyPSO.cpp b/eo/test/t-eoEasyPSO.cpp index 16890093..96e5b004 100644 --- a/eo/test/t-eoEasyPSO.cpp +++ b/eo/test/t-eoEasyPSO.cpp @@ -101,4 +101,3 @@ int main() return 0; } -//----------------------------------------------------------------------------- diff --git a/eo/test/t-eoFunctor.cpp b/eo/test/t-eoFunctor.cpp index 27ccf995..b0bf5249 100644 --- a/eo/test/t-eoFunctor.cpp +++ b/eo/test/t-eoFunctor.cpp @@ -46,4 +46,4 @@ int main(void) eo.push_back(2); return 1; -} \ No newline at end of file +} diff --git a/eo/test/t-eoLogger.cpp b/eo/test/t-eoLogger.cpp index e306fb9d..c087e2a2 100644 --- a/eo/test/t-eoLogger.cpp +++ b/eo/test/t-eoLogger.cpp @@ -27,26 +27,26 @@ int main(int ac, char** av) eo::log << eo::warnings; - eo::log << "We are written on the default defined standard output" << std::endl; + eo::log << "We are writing on the default output stream" << std::endl; eo::log << eo::file("test.txt") << "In FILE" << std::endl; - eo::log << std::cout << "In COUT" << std::endl; + eo::log << std::cout << "on COUT" << std::endl; eo::log << eo::setlevel("errors"); eo::log << eo::setlevel(eo::errors); - eo::log << eo::quiet << "1) Must be in quiet mode" << std::endl; + eo::log << eo::quiet << "1) in quiet mode" << std::endl; - eo::log << eo::setlevel(eo::warnings) << eo::warnings << "2) Must be in warnings mode" << std::endl; + eo::log << eo::setlevel(eo::warnings) << eo::warnings << "2) in warnings mode" << std::endl; eo::log << eo::setlevel(eo::logging); eo::log << eo::errors; - eo::log << "3) Must be in errors mode"; + eo::log << "3) in errors mode"; eo::log << std::endl; eo::log << eo::debug << 4 << ')' - << " Must be in debug mode\n"; + << "4) in debug mode\n"; return 0; }