Test and sources have been updated to improve coverage and dynamic tests

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1122 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jboisson 2008-03-12 14:10:00 +00:00
commit 4d252c4373
30 changed files with 616 additions and 394 deletions

View file

@ -133,10 +133,10 @@ class moILS:public moAlgo < typename M::EOType >
double _initial_temperature, moCoolingSchedule & _cooling_schedule, moSolContinue <EOT> & _continue,
moComparator<EOT> & _acceptance_criterion, eoMonOp<EOT> & _perturbation, eoEvalFunc<EOT> & _full_evaluation):
algorithm(new moSA<M>(_random_move_generator, _incremental_evaluation, _moSA_continue, _initial_temperature,
_cooling_schedule, _full_evaluation) ),
_cooling_schedule, _full_evaluation) ),
continu(_continue), acceptance_criterion(_acceptance_criterion), perturbation(_perturbation), full_evaluation(_full_evaluation),
algorithm_memory_allocation(true)
{}
{}
//! Destructor
~moILS()

View file

@ -143,6 +143,7 @@ class moSimpleSolutionTabuList: public moTabuList < M >
if (it!=tabuList.end())
{
tabuList.erase(it);
memory_size--;
}
}

View file

@ -81,7 +81,7 @@ class moSteadyFitSolContinue:public moSolContinue < EOT >
if (_solution.invalid())
{
return true;
throw std::runtime_error("[moSteadyFitSolContinue.h]: The current solution has not been evaluated.");
}
if (firstFitnessSaved)

View file

@ -61,11 +61,14 @@ public :
int
main()
{
std::string test_result, test_1, test_2;
int return_value, value_1, value_2;
unsigned int i, fitness;
moBestImprSelect<testMove> selection;
solution sol;
solution solution;
testMove move;
@ -75,27 +78,31 @@ main()
selection.init(0);
for(i=1;i<10;i++)
test_1="KO";
try
{
if(! selection.update(move, i) )
{
cout << "KO" << endl;
cout << "update is false" << endl;
return EXIT_FAILURE;
}
selection(move, fitness);
}
catch(std::runtime_error e)
{
test_1="OK";
}
value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
test_2=((!selection.update(move, i))?"KO":"OK");
value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
selection(move, fitness);
if(fitness!=9)
{
cout << "KO" << endl;
cout << "fitness = " << fitness << endl;
return EXIT_FAILURE;
}
move(solution);
test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO");
return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE);
cout << "OK" << endl;
return EXIT_SUCCESS;
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -51,6 +51,9 @@ using std::endl;
int
main()
{
int return_value;
std::string test_result;
unsigned int i;
double temperature;
@ -66,15 +69,11 @@ main()
i++;
}
if(i!=1)
{
cout << "KO" << endl;
cout << "i = " << i << endl;
return EXIT_FAILURE;
}
cout << "OK" << endl;
return EXIT_SUCCESS;
test_result=((i!=1)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -61,11 +61,13 @@ public :
int
main()
{
std::string test_result;
int return_value;
unsigned int i, fitness;
moFirstImprSelect<testMove> selection;
solution sol;
solution solution;
testMove move;
@ -82,15 +84,13 @@ main()
selection(move, fitness);
if(fitness!=11)
{
cout << "KO" << endl;
cout << "fitness = " << fitness << endl;
return EXIT_FAILURE;
}
cout << "OK" << std::endl;
return EXIT_SUCCESS;
move(solution);
test_result=((fitness!=11)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -52,6 +52,9 @@ typedef EO<unsigned int> solution;
int
main()
{
std::string test_result;
int return_value;
solution sol1, sol2;
moFitComparator<solution> comparator;
@ -61,14 +64,11 @@ main()
cout << "[ moFitComparator ] ==> ";
if( comparator(sol1,sol2) )
{
cout << "KO" << endl;
return EXIT_FAILURE;
}
cout << "OK" << endl;
return EXIT_SUCCESS;
test_result=((comparator(sol1,sol2))?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -52,30 +52,50 @@ typedef EO<unsigned int> solution;
int
main()
{
unsigned int i;
solution sol;
std::string test_result, test_1, test_2;
int return_value, value_1, value_2;
unsigned int i;
moFitSolContinue<solution> continu(10);
solution solution;
cout << "[ moFitSolContinue ] ==> ";
i=0;
sol.fitness(i);
while( continu(sol) )
continu.init();
test_1="KO";
try
{
i++;
sol.fitness(i);
continu(solution);
}
catch(std::runtime_error e)
{
test_1="OK";
}
if(i!=10)
{
cout << "KO" << endl;
cout << "i = " << i << endl;
return EXIT_FAILURE;
}
value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << "OK" << endl;
return EXIT_SUCCESS;
i=0;
solution.fitness(i);
while( continu(solution) )
{
i++;
solution.fitness(i);
}
test_2=((i!=10)?"KO":"OK");
value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO");
return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -52,6 +52,9 @@ typedef EO<unsigned int> solution;
int
main()
{
std::string test_result, test_1, test_2;
int value_1, value_2, return_value;
unsigned int i;
solution sol;
@ -65,12 +68,8 @@ main()
i++;
}
if(i!=9)
{
cout << "KO" << endl;
cout << "before init: i = " << i << endl;
return EXIT_FAILURE;
}
test_1=((i!=9)?"KO":"OK");
value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
continu.init();
@ -79,16 +78,15 @@ main()
{
i++;
}
test_2=((i!=9)?"KO":"OK");
value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO");
return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE);
if(i!=9)
{
cout << "KO" << endl;
cout << "after init: i = " << i << endl;
return EXIT_FAILURE;
}
cout << "OK" << endl;
return EXIT_SUCCESS;
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -135,9 +135,10 @@ public :
int
main()
{
cout << "[ moHC ] ==> ";
solution sol;
std::string test_result;
int return_value;
solution solution;
testMoveInit init;
testMoveNext next;
@ -147,16 +148,15 @@ main()
moHC<testMove> hc(init, next, incrEval, select, eval);
hc(sol);
if(sol.fitness()!=2)
{
cout << "KO" << endl;
return EXIT_FAILURE;
}
cout << "[ moHC ] ==> ";
cout << "OK" << endl;
return EXIT_SUCCESS;
hc(solution);
test_result=((solution.fitness()!=2)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -125,30 +125,46 @@ public :
int
main()
{
cout << "[ moHCMoveLoopExpl ] ==> ";
std::string test_result, test_1, test_2;
int return_value, value_1, value_2;
solution sol1, sol2;
sol1.fitness(0);
sol2.fitness(0);
solution solution_1, solution_2;
testMoveInit init;
testMoveNext next;
testMoveIncrEval incrEval;
testMoveSelect select;
moHCMoveLoopExpl<testMove> explorer(init, next, incrEval, select);
explorer(sol1, sol2);
if(sol2.fitness()!=2)
{
cout << "KO" << endl;
return EXIT_FAILURE;
}
cout << "OK" << endl;
return EXIT_SUCCESS;
moHCMoveLoopExpl<testMove> explorer(init, next, incrEval, select);
cout << "[ moHCMoveLoopExpl ] ==> ";
test_1="KO";
try
{
explorer(solution_1, solution_2);
}
catch(std::runtime_error e)
{
test_1="OK";
}
value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
solution_1.fitness(0);
solution_2.fitness(0);
explorer(solution_1, solution_2);
test_2=((solution_2.fitness()!=2)?"KO":"OK");
value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO");
return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -61,6 +61,8 @@ class testMoveExplorer : public moMoveExpl<testMove>
public :
void operator () (const solution & _solution_1, solution & _solution_2)
{
const solution sol(_solution_1);
_solution_2.fitness(2);
}
};
@ -80,25 +82,25 @@ public :
int
main()
{
cout << "[ moHC_2 ] ==> ";
solution sol;
std::string test_result;
int return_value;
solution solution;
solutionEval eval;
testMoveExplorer explorer;
moHC<testMove> hc(explorer, eval);
hc(sol);
if(sol.fitness()!=2)
{
cout << "KO" << endl;
return EXIT_FAILURE;
}
cout << "[ moHC_2 ] ==> ";
cout << "OK" << endl;
return EXIT_SUCCESS;
hc(solution);
test_result=((solution.fitness()!=2)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -61,7 +61,7 @@ class solutionAlgo : public moAlgo <solution>
public :
bool operator () (solution & _solution)
{
_solution.fitness(2);
solution solution(_solution);
return true;
}
} ;
@ -69,27 +69,49 @@ public :
class solutionContinue : public moSolContinue<solution>
{
public :
solutionContinue(): counter(0)
{}
bool operator () (const solution & _solution)
{
const solution sol(_solution);
if(counter<2)
{
counter++;
return true;
}
return false;
}
void init()
{}
private :
unsigned int counter;
} ;
class solutionComparator : public moComparator<solution>
{
public :
solutionComparator() : counter(0)
{}
bool operator () (const solution & _solution1 , const solution & _solution2)
{
const solution sol1(_solution1);
const solution sol2(_solution2);
if(counter<2)
{
counter++;
return false;
}
return true;
}
private :
unsigned int counter;
} ;
class solutionPerturbation : public eoMonOp<solution>
@ -97,7 +119,7 @@ class solutionPerturbation : public eoMonOp<solution>
public :
bool operator () (solution & _solution)
{
solution sol(_solution);
_solution.fitness(2);
return true;
}
@ -108,7 +130,7 @@ class solutionEval : public eoEvalFunc <solution>
public :
void operator () (solution & _solution)
{
_solution.fitness(0);
solution solution(_solution);
}
} ;
@ -117,30 +139,30 @@ public :
int
main()
{
cout << "[ moILS ] ==> ";
std::string test_result;
int return_value;
solution solution;
solution sol;
sol.fitness(0);
solutionAlgo algorithm;
solutionContinue continu;
solutionComparator comparator;
solutionPerturbation perturbation;
solutionEval eval;
moILS<testMove> ils(algorithm, continu, comparator, perturbation, eval);
ils(sol);
if(sol.fitness()!=2)
{
cout << "KO" << endl;
return EXIT_FAILURE;
}
cout << "[ moILS ] ==> ";
cout << "OK" << endl;
return EXIT_SUCCESS;
solution.fitness(0);
ils(solution);
test_result=((solution.fitness()!=2)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -132,15 +132,25 @@ public :
class solutionContinue : public moSolContinue<solution>
{
public :
solutionContinue(): counter(0)
{}
bool operator () (const solution & _solution)
{
const solution sol(_solution);
if(counter==0)
{
counter++;
return true;
}
return false;
}
void init()
{}
private :
unsigned int counter;
} ;
class solutionComparator : public moComparator<solution>
@ -160,7 +170,7 @@ class solutionPerturbation : public eoMonOp<solution>
public :
bool operator () (solution & _solution)
{
solution sol(_solution);
_solution.fitness(2);
return true;
}
@ -171,34 +181,31 @@ public :
int
main()
{
cout << "[ moILS_HC ] ==> ";
solution sol;
std::string test_result;
int return_value;
solution solution;
testMoveInit init;
testMoveNext next;
testMoveIncrEval incrEval;
testMoveSelect select;
solutionEval eval;
moHC<testMove> hc(init, next, incrEval, select, eval);
solutionContinue continu;
solutionComparator comparator;
solutionPerturbation perturbation;
moILS<testMove> ils(hc, continu, comparator, perturbation, eval);
ils(sol);
if(sol.fitness()!=2)
{
cout << "KO" << endl;
return EXIT_FAILURE;
}
moILS<testMove> ils(init, next, incrEval, select, continu, comparator, perturbation, eval);
cout << "OK" << endl;
return EXIT_SUCCESS;
cout << "[ moILS_HC ] ==> ";
ils(solution);
test_result=((solution.fitness()!=2)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -94,34 +94,50 @@ class solutionEval : public eoEvalFunc <solution>
public :
void operator () (solution & _solution)
{
_solution.fitness(2);
const solution solution(_solution);
}
} ;
class solutionContinue : public moSolContinue<solution>
{
public :
solutionContinue(): counter(0)
{}
bool operator () (const solution & _solution)
{
const solution sol(_solution);
if(counter==0)
{
counter++;
return true;
}
return false;
}
void init()
{}
private :
unsigned int counter;
} ;
class solutionComparator : public moComparator<solution>
{
public :
solutionComparator() : counter(0)
{}
bool operator () (const solution & _solution1 , const solution & _solution2)
{
const solution sol1(_solution1);
const solution sol2(_solution2);
const solution solution1(_solution1);
const solution solution2(_solution2);
return true;
}
private :
unsigned int counter;
} ;
class solutionPerturbation : public eoMonOp<solution>
@ -129,7 +145,7 @@ class solutionPerturbation : public eoMonOp<solution>
public :
bool operator () (solution & _solution)
{
solution sol(_solution);
_solution.fitness(2);
return true;
}
@ -140,35 +156,35 @@ public :
int
main()
{
cout << "[ moILS_SA ] ==> ";
std::string test_result;
int return_value;
solution sol;
sol.fitness(0);
solution solution;
testRandMove rand;
testMoveIncrEval incrEval;
solutionContinue continu;
solutionContinue continu_2;
testCooling cooling;
solutionEval eval;
moSA<testMove> sa(rand, incrEval, continu, 10.0, cooling, eval);
solutionComparator comparator;
solutionPerturbation perturbation;
moILS<testMove> ils(sa, continu, comparator, perturbation, eval);
moILS<testMove> ils(rand, incrEval, continu, 10.0, cooling, continu_2, comparator, perturbation, eval);
ils(sol);
cout << "[ moILS_SA ] ==> ";
if(sol.fitness()!=2)
{
cout << "KO" << endl;
return EXIT_FAILURE;
}
solution.fitness(0);
eval(solution);
cout << "OK" << endl;
return EXIT_SUCCESS;
ils(solution);
test_result=((solution.fitness()!=2)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -133,15 +133,25 @@ public:
class solutionContinue : public moSolContinue<solution>
{
public :
solutionContinue(): counter(0)
{}
bool operator () (const solution & _solution)
{
const solution sol(_solution);
if(counter==0)
{
counter++;
return true;
}
return false;
}
void init()
{}
private :
unsigned int counter;
} ;
class solutionComparator : public moComparator<solution>
@ -161,7 +171,7 @@ class solutionPerturbation : public eoMonOp<solution>
public :
bool operator () (solution & _solution)
{
solution sol(_solution);
_solution.fitness(2);
return true;
}
@ -172,7 +182,7 @@ class solutionEval : public eoEvalFunc <solution>
public :
void operator () (solution & _solution)
{
_solution.fitness(2);
_solution.fitness(0);
}
} ;
@ -181,11 +191,10 @@ public :
int
main()
{
cout << "[ moILS_TS ] ==> ";
solution sol;
std::string test_result;
int return_value;
sol.fitness(0);
solution solution;
testMoveInit init;
testMoveNext next;
@ -194,24 +203,21 @@ main()
testAspirCrit aspirCrit;
solutionEval eval;
solutionContinue continu;
moTS<testMove> ts(init, next, incrEval, tabuList, aspirCrit, continu, eval);
solutionContinue continu_2;
solutionComparator comparator;
solutionPerturbation perturbation;
moILS<testMove> ils(ts, continu, comparator, perturbation, eval);
moILS<testMove> ils(init, next, incrEval, tabuList, aspirCrit, continu, continu_2, comparator, perturbation, eval);
ils(sol);
if(sol.fitness()!=2)
{
cout << "KO" << endl;
return EXIT_FAILURE;
}
cout << "[ moILS_TS ] ==> ";
cout << "OK" << endl;
return EXIT_SUCCESS;
ils(solution);
test_result=((solution.fitness()!=2)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -61,6 +61,11 @@ public :
int
main()
{
std::string test_result, test_1, test_2;
int return_value, value_1, value_2;
solution solution;
unsigned int i;
moImprBestFitAspirCrit<testMove> aspirCriterion;
@ -77,12 +82,8 @@ main()
i++;
}
if(i!=10)
{
cout << "KO" << endl;
cout << "before init, i = " << i << endl;
return EXIT_FAILURE;
}
test_1=((i!=10)?"KO":"OK");
value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
aspirCriterion.init();
aspirCriterion(move, i);
@ -93,15 +94,16 @@ main()
i++;
}
if(i!=10)
{
cout << "KO" << endl;
cout << "after init, i = " << i << endl;
return EXIT_FAILURE;
}
cout << "OK" << std::endl;
return EXIT_SUCCESS;
move(solution);
test_2=((i!=10)?"KO":"OK");
value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO");
return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -70,10 +70,13 @@ public :
int
main()
{
std::string test_result, test_1, test_2;
int value_1, value_2, return_value;
unsigned int i;
testMove move;
solution sol;
solution solution;
testRandMove rand;
@ -82,33 +85,30 @@ main()
cout << "[ moItRandNextMove ] ==> ";
i=0;
while( next(move, sol) && i<15 )
while( next(move, solution) && i<15 )
{
i++;
}
if(i!=11)
{
cout << "KO" << endl;
cout << "First time, i = " << i << endl;
return EXIT_FAILURE;
}
test_1=((i!=11)?"KO":"OK");
value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
i=0;
while( next(move, sol) && i<15 )
while( next(move, solution) && i<15 )
{
i++;
}
if(i!=11)
{
cout << "KO" << endl;
cout << "Second time, i = " << i << endl;
return EXIT_FAILURE;
}
cout << "OK" << endl;
return EXIT_SUCCESS;
move(solution);
test_2=((i!=11)?"KO":"OK");
value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO");
return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -72,43 +72,45 @@ class testBF : public eoBF<const testMove & , const testMove::EOType &, void>
int
main()
{
std::string test_result, test_1, test_2;
int value_1, value_2, return_value;
unsigned int i;
std::string result;
testBF test;
moLSCheckPoint<testMove> checkpoint;
solution sol;
solution solution;
testMove move;
std::ifstream is;
cout << "[ moLSCheckPoint ] ==> ";
i=0;
checkpoint.add(test);
checkpoint(move, sol);
checkpoint(move, solution);
std::ifstream is("test.txt");
move(solution);
if(!is.is_open())
{
cout << "KO" << endl;
cout << "test.txt does not exist" << endl;
return EXIT_FAILURE;
}
is.open("test.txt");
test_1=((!is.is_open())?"KO":"OK");
value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
is >> result;
if(result.compare("OK")!=0)
{
cout << "KO" << endl;
cout << "result = " << result << endl;
return EXIT_FAILURE;
}
test_2=((result.compare("OK")!=0)?"KO":"OK");
value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO");
return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE);
cout << "OK" << endl;
return EXIT_SUCCESS;
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

View file

@ -51,30 +51,29 @@ using std::endl;
int
main()
{
std::string test_result;
int return_value;
unsigned int i;
double temperature;
moLinearCoolingSchedule coolingSchedule( 1.0, 0.5 );
temperature=2.0;
cout << "[ moLinearCoolingSchedule ] ==> ";
temperature=2.0;
i=0;
while( coolingSchedule(temperature) )
{
i++;
}
if(i!=1)
{
cout << "KO" << endl;
cout << "i = " << i << endl;
return EXIT_FAILURE;
}
cout << "OK" << endl;
return EXIT_SUCCESS;
test_result=((i!=1)?"KO":"OK");
return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS);
cout << test_result << endl;
return return_value;
}
//-----------------------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show more