From 0de5e51fd601c2b47c722a7a61af7ba6afd91644 Mon Sep 17 00:00:00 2001 From: jhumeau Date: Wed, 28 Apr 2010 15:59:41 +0000 Subject: [PATCH] test added git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1756 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-mo/test/CMakeLists.txt | 2 + trunk/paradiseo-mo/test/t-moFirstImprHC.cpp | 64 ++++++++++++++++++++ trunk/paradiseo-mo/test/t-moRandomBestHC.cpp | 64 ++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 trunk/paradiseo-mo/test/t-moFirstImprHC.cpp create mode 100644 trunk/paradiseo-mo/test/t-moRandomBestHC.cpp diff --git a/trunk/paradiseo-mo/test/CMakeLists.txt b/trunk/paradiseo-mo/test/CMakeLists.txt index beee3d274..536f35ab2 100644 --- a/trunk/paradiseo-mo/test/CMakeLists.txt +++ b/trunk/paradiseo-mo/test/CMakeLists.txt @@ -75,6 +75,8 @@ SET (TEST_LIST t-moLocalSearch t-moILSexplorer t-moSimpleHC + t-moFirstImprHC + t-moRandomBestHC ) FOREACH (test ${TEST_LIST}) diff --git a/trunk/paradiseo-mo/test/t-moFirstImprHC.cpp b/trunk/paradiseo-mo/test/t-moFirstImprHC.cpp new file mode 100644 index 000000000..698c1f33b --- /dev/null +++ b/trunk/paradiseo-mo/test/t-moFirstImprHC.cpp @@ -0,0 +1,64 @@ +/* + +Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + +Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can ue, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. + +ParadisEO WebSite : http://paradiseo.gforge.inria.fr +Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#include +#include +#include + +#include +#include "moTestClass.h" +#include +#include +#include + +int main(){ + + std::cout << "[t-moFirstImprHC] => START" << std::endl; + + bitNeighborhood nh(4); + oneMaxFullEval fullEval; + evalOneMax eval(4); + + //test first constructor + moFirstImprHC test1(nh, fullEval, eval); + + //test second constructor + moTrueContinuator cont; + moFirstImprHC test2(nh, fullEval, eval, cont); + + //test third constructor + moSolNeighborComparator sncomp; + moNeighborComparator ncomp; + moFirstImprHC test3(nh, fullEval, eval, cont, ncomp, sncomp); + + std::cout << "[t-moFirstImprHC] => OK" << std::endl; + + return EXIT_SUCCESS; +} + diff --git a/trunk/paradiseo-mo/test/t-moRandomBestHC.cpp b/trunk/paradiseo-mo/test/t-moRandomBestHC.cpp new file mode 100644 index 000000000..eb958658c --- /dev/null +++ b/trunk/paradiseo-mo/test/t-moRandomBestHC.cpp @@ -0,0 +1,64 @@ +/* + +Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + +Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can ue, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. + +ParadisEO WebSite : http://paradiseo.gforge.inria.fr +Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#include +#include +#include + +#include +#include "moTestClass.h" +#include +#include +#include + +int main(){ + + std::cout << "[t-moRandomBestHC] => START" << std::endl; + + bitNeighborhood nh(4); + oneMaxFullEval fullEval; + evalOneMax eval(4); + + //test first constructor + moRandomBestHC test1(nh, fullEval, eval); + + //test second constructor + moTrueContinuator cont; + moRandomBestHC test2(nh, fullEval, eval, cont); + + //test third constructor + moSolNeighborComparator sncomp; + moNeighborComparator ncomp; + moRandomBestHC test3(nh, fullEval, eval, cont, ncomp, sncomp); + + std::cout << "[t-moRandomBestHC] => OK" << std::endl; + + return EXIT_SUCCESS; +} +