Unverified Commit 3d0b9f03 authored by Merwane Bouri's avatar Merwane Bouri
Browse files

Problème test Von Neumann à résoudre

parent a395c350
Pipeline #79235 failed with stage
......@@ -5,5 +5,24 @@
#include "vonNeumannNeighborhoodRule.hpp"
void CellulutTests::test_VonNeumann(){
Grid g(11,11);
Coord cellule={5,5};
Coord pos1={5,6};
Coord pos2={6,5};
Coord pos3={5,4};
Coord pos4={4,5};
g.set_cell(cellule,1);
g.set_cell(pos1,2);
g.set_cell(pos2,3);
g.set_cell(pos3,3);
g.set_cell(pos4,5);
vonNeumannNeighborhoodRule voi(1);
Neighborhood v=voi.getNeighborhood(g,cellule);
unsigned int nb_voi=v.getNb(3);
QCOMPARE(nb_voi,2);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment