Doc and tests added

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1706 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-03-23 15:14:04 +00:00
commit baf31d0c30
25 changed files with 159 additions and 26 deletions

View file

@ -43,12 +43,15 @@ int main(){
eoBit<int> sol;
moBitNeighbor<int> n;
//instanciation
moRndWithoutReplNeighborhood< moBitNeighbor<int> > test(3);
moRndWithoutReplNeighborhood< moBitNeighbor<int> > test2(0);
//on verifie que test a bien des voisins et que test2 n'en a pas
assert(test.hasNeighbor(sol));
assert(!test2.hasNeighbor(sol));
//on recupere successivement les index
test.init(sol, n);
assert(test.cont(sol));
a=test.position();
@ -59,6 +62,7 @@ int main(){
assert(!test.cont(sol));
c=test.position();
//on s'assure qu'on a bien 0, 1 et 2 (dans un ordre aléatoire)
assert(a==0 || b==0 || c==0);
assert(a==1 || b==1 || c==1);
assert(a==2 || b==2 || c==2);