Commit 3c068364 authored by Yann Boucher's avatar Yann Boucher
Browse files

Suppression des warnings

parent 84a63fd7
Pipeline #79742 passed with stages
in 16 seconds
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<string>Width :</string> <string>Width :</string>
</property> </property>
<property name="buddy"> <property name="buddy">
<cstring>widthSpinBox</cstring> <cstring>widthSpinBox_2</cstring>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<string>Height :</string> <string>Height :</string>
</property> </property>
<property name="buddy"> <property name="buddy">
<cstring>heightSpinBox</cstring> <cstring>heightSpinBox_2</cstring>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
//! \brief Change le numéro de génération de la règle de voisinage d'une génération //! \brief Change le numéro de génération de la règle de voisinage d'une génération
//! Fait avancer ou reculer l'état de la règle de voisinage d'une génération. Cette fonction est utilisée pour les voisinages tels que celui de Margolus, qui dépendent de la parité de la génération actuelle. //! Fait avancer ou reculer l'état de la règle de voisinage d'une génération. Cette fonction est utilisée pour les voisinages tels que celui de Margolus, qui dépendent de la parité de la génération actuelle.
//! \remark L'implémentation par défaut ne fait rien. //! \remark L'implémentation par défaut ne fait rien.
virtual void update_generation(unsigned gen) {} virtual void update_generation(unsigned gen) { (void)gen; }
}; };
#endif // NEIGHBORHOODRULE_HPP #endif // NEIGHBORHOODRULE_HPP
...@@ -126,7 +126,6 @@ void StructureLibraryView::update_preview(const Structure &s) ...@@ -126,7 +126,6 @@ void StructureLibraryView::update_preview(const Structure &s)
QImage StructureLibraryView::create_preview_image(const Structure &s, bool transparent) QImage StructureLibraryView::create_preview_image(const Structure &s, bool transparent)
{ {
stateColor bg = m_alph.getState(0).getColor();
QImage img(s.width(), s.height(), QImage::Format_ARGB32); QImage img(s.width(), s.height(), QImage::Format_ARGB32);
if (transparent) if (transparent)
img.fill(Qt::transparent); img.fill(Qt::transparent);
......
...@@ -31,7 +31,7 @@ void CellulutTests::test_arbitrary_neighborhood_rule() ...@@ -31,7 +31,7 @@ void CellulutTests::test_arbitrary_neighborhood_rule()
prop->accept(visit); prop->accept(visit);
} }
QCOMPARE(rule.getFormats().size(), 1); QCOMPARE(rule.getFormats().size(), 1ul);
QCOMPARE(rule.getFormats()[0].positions.size(), coords.size()); QCOMPARE(rule.getFormats()[0].positions.size(), coords.size());
auto list = rule.getFormats()[0].positions; auto list = rule.getFormats()[0].positions;
......
...@@ -24,7 +24,7 @@ void CellulutTests::test_circulartransition() ...@@ -24,7 +24,7 @@ void CellulutTests::test_circulartransition()
n.addNeighbor({1, 0}, 0); n.addNeighbor({1, 0}, 0);
n.addNeighbor({-1, 0}, 1); n.addNeighbor({-1, 0}, 1);
unsigned next = rule.getState(0, n); int next = rule.getState(0, n);
QCOMPARE(next, 0); QCOMPARE(next, 0);
} }
...@@ -36,7 +36,7 @@ void CellulutTests::test_circulartransition() ...@@ -36,7 +36,7 @@ void CellulutTests::test_circulartransition()
n.addNeighbor({1, 0}, 1); n.addNeighbor({1, 0}, 1);
n.addNeighbor({-1, 0}, 0); n.addNeighbor({-1, 0}, 0);
unsigned next = rule.getState(0, n); int next = rule.getState(0, n);
QCOMPARE(next, 1); QCOMPARE(next, 1);
} }
...@@ -48,7 +48,7 @@ void CellulutTests::test_circulartransition() ...@@ -48,7 +48,7 @@ void CellulutTests::test_circulartransition()
n.addNeighbor({1, 0}, 2); n.addNeighbor({1, 0}, 2);
n.addNeighbor({-1, 0}, 0); n.addNeighbor({-1, 0}, 0);
unsigned next = rule.getState(1, n); int next = rule.getState(1, n);
QCOMPARE(next, 2); QCOMPARE(next, 2);
} }
...@@ -60,7 +60,7 @@ void CellulutTests::test_circulartransition() ...@@ -60,7 +60,7 @@ void CellulutTests::test_circulartransition()
n.addNeighbor({1, 0}, 0); n.addNeighbor({1, 0}, 0);
n.addNeighbor({-1, 0}, 0); n.addNeighbor({-1, 0}, 0);
unsigned next = rule.getState(3, n); int next = rule.getState(3, n);
QCOMPARE(next, 0); QCOMPARE(next, 0);
} }
} }
...@@ -13,7 +13,7 @@ void CellulutTests::test_grid() ...@@ -13,7 +13,7 @@ void CellulutTests::test_grid()
grid.set_cell(pos2,10); grid.set_cell(pos2,10);
Coord pos3 = {1,2}; Coord pos3 = {1,2};
grid.set_cell(pos3,1); grid.set_cell(pos3,1);
unsigned int state = grid.get_state(pos1); int state = grid.get_state(pos1);
QCOMPARE(state, 2); QCOMPARE(state, 2);
QVERIFY(grid.get_state(pos2) == 10); QVERIFY(grid.get_state(pos2) == 10);
QVERIFY(grid.get_state(pos3) == 1); QVERIFY(grid.get_state(pos3) == 1);
......
...@@ -27,12 +27,12 @@ void CellulutTests::test_history() ...@@ -27,12 +27,12 @@ void CellulutTests::test_history()
// On pop la première grille puis la deuxième // On pop la première grille puis la deuxième
Grid popGrid = historyTest.popGrid(); Grid popGrid = historyTest.popGrid();
QCOMPARE(popGrid.get_state(pos2), 3); QCOMPARE(popGrid.get_state(pos2), 3ul);
Grid topGrid = historyTest.topGrid(); Grid topGrid = historyTest.topGrid();
QVERIFY(topGrid.get_state(pos1) == 2); QVERIFY(topGrid.get_state(pos1) == 2);
popGrid = historyTest.popGrid(); popGrid = historyTest.popGrid();
QCOMPARE(popGrid.get_state(pos1), 2); QCOMPARE(popGrid.get_state(pos1), 2ul);
QVERIFY(historyTest.isEmpty() == true); QVERIFY(historyTest.isEmpty() == true);
// Push de trois grille (taille max de la pile de l'history = 2) // Push de trois grille (taille max de la pile de l'history = 2)
...@@ -41,11 +41,11 @@ void CellulutTests::test_history() ...@@ -41,11 +41,11 @@ void CellulutTests::test_history()
historyTest.pushGrid(gridTest3); // La première grille est supprimée historyTest.pushGrid(gridTest3); // La première grille est supprimée
popGrid = historyTest.popGrid(); popGrid = historyTest.popGrid();
QCOMPARE(popGrid.get_state(pos3), 4); QCOMPARE(popGrid.get_state(pos3), 4ul);
topGrid = historyTest.topGrid(); topGrid = historyTest.topGrid();
QVERIFY(topGrid.get_state(pos2) == 3); QVERIFY(topGrid.get_state(pos2) == 3);
popGrid = historyTest.popGrid(); popGrid = historyTest.popGrid();
QCOMPARE(popGrid.get_state(pos2), 3); QCOMPARE(popGrid.get_state(pos2), 3ul);
QVERIFY(historyTest.isEmpty() == true); QVERIFY(historyTest.isEmpty() == true);
} }
...@@ -14,7 +14,7 @@ void CellulutTests::test_lifegametransition() ...@@ -14,7 +14,7 @@ void CellulutTests::test_lifegametransition()
n.addNeighbor({1, 0}, 0); n.addNeighbor({1, 0}, 0);
n.addNeighbor({-1, 0}, 1); n.addNeighbor({-1, 0}, 1);
unsigned next = rule.getState(0, n); int next = rule.getState(0, n);
QCOMPARE(next, 0); QCOMPARE(next, 0);
} }
...@@ -26,7 +26,7 @@ void CellulutTests::test_lifegametransition() ...@@ -26,7 +26,7 @@ void CellulutTests::test_lifegametransition()
n.addNeighbor({1, 0}, 0); n.addNeighbor({1, 0}, 0);
n.addNeighbor({-1, 0}, 1); n.addNeighbor({-1, 0}, 1);
unsigned next = rule.getState(0, n); int next = rule.getState(0, n);
QCOMPARE(next, 1); QCOMPARE(next, 1);
} }
...@@ -38,7 +38,7 @@ void CellulutTests::test_lifegametransition() ...@@ -38,7 +38,7 @@ void CellulutTests::test_lifegametransition()
n.addNeighbor({1, 0}, 0); n.addNeighbor({1, 0}, 0);
n.addNeighbor({-1, 0}, 0); n.addNeighbor({-1, 0}, 0);
unsigned next = rule.getState(1, n); int next = rule.getState(1, n);
QCOMPARE(next, 1); QCOMPARE(next, 1);
} }
...@@ -51,7 +51,7 @@ void CellulutTests::test_lifegametransition() ...@@ -51,7 +51,7 @@ void CellulutTests::test_lifegametransition()
n.addNeighbor({-1, 0}, 1); n.addNeighbor({-1, 0}, 1);
n.addNeighbor({-1, -1}, 1); n.addNeighbor({-1, -1}, 1);
unsigned next = rule.getState(1, n); int next = rule.getState(1, n);
QCOMPARE(next, 0); QCOMPARE(next, 0);
} }
...@@ -63,7 +63,7 @@ void CellulutTests::test_lifegametransition() ...@@ -63,7 +63,7 @@ void CellulutTests::test_lifegametransition()
n.addNeighbor({1, 0}, 1); n.addNeighbor({1, 0}, 1);
n.addNeighbor({-1, 0}, 0); n.addNeighbor({-1, 0}, 0);
unsigned next = rule.getState(1, n); int next = rule.getState(1, n);
QCOMPARE(next, 0); QCOMPARE(next, 0);
} }
} }
...@@ -52,12 +52,12 @@ void CellulutTests::test_mooreNeighborhoodRule() { ...@@ -52,12 +52,12 @@ void CellulutTests::test_mooreNeighborhoodRule() {
prop->accept(visit); prop->accept(visit);
Neighborhood v=newMoore.getNeighborhood(g,cellule); Neighborhood v=newMoore.getNeighborhood(g,cellule);
unsigned int nb_voi=v.getNb(3); int nb_voi=v.getNb(3);
unsigned int nb_voi2=v.getNb(5); int nb_voi2=v.getNb(5);
unsigned int nb_voi3=v.getNb(2); int nb_voi3=v.getNb(2);
unsigned int nb_voi4=v.getNb(8); int nb_voi4=v.getNb(8);
unsigned int nb_voi5=v.getNb(7); int nb_voi5=v.getNb(7);
unsigned int nb_voi6=v.getNb(4); int nb_voi6=v.getNb(4);
QCOMPARE(nb_voi,2); QCOMPARE(nb_voi,2);
QCOMPARE(nb_voi2,2); QCOMPARE(nb_voi2,2);
......
...@@ -19,10 +19,10 @@ void CellulutTests::test_VonNeumann(){ ...@@ -19,10 +19,10 @@ void CellulutTests::test_VonNeumann(){
vonNeumannNeighborhoodRule voi(1); vonNeumannNeighborhoodRule voi(1);
Neighborhood v=voi.getNeighborhood(g,cellule); Neighborhood v=voi.getNeighborhood(g,cellule);
unsigned int nb_voi=v.getNb(3); int nb_voi=v.getNb(3);
unsigned int nb_voi2=v.getNb(5); int nb_voi2=v.getNb(5);
unsigned int nb_voi3=v.getNb(2); int nb_voi3=v.getNb(2);
unsigned int nb_voi4=v.getNb(8); int nb_voi4=v.getNb(8);
QCOMPARE(nb_voi,2); QCOMPARE(nb_voi,2);
QCOMPARE(nb_voi2,1); QCOMPARE(nb_voi2,1);
QCOMPARE(nb_voi3,1); QCOMPARE(nb_voi3,1);
......
...@@ -18,7 +18,7 @@ void CellulutTests::test_nonisotropictransition() ...@@ -18,7 +18,7 @@ void CellulutTests::test_nonisotropictransition()
unsigned next = 0; unsigned next = 0;
bool accepted = entry.accept(0, neighborhood, next); bool accepted = entry.accept(0, neighborhood, next);
QVERIFY(accepted); QVERIFY(accepted);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
...@@ -46,7 +46,7 @@ void CellulutTests::test_nonisotropictransition() ...@@ -46,7 +46,7 @@ void CellulutTests::test_nonisotropictransition()
unsigned next = 0; unsigned next = 0;
bool accepted = entry.accept(0, neighborhood, next); bool accepted = entry.accept(0, neighborhood, next);
QVERIFY(accepted); QVERIFY(accepted);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
...@@ -73,7 +73,7 @@ void CellulutTests::test_nonisotropictransition() ...@@ -73,7 +73,7 @@ void CellulutTests::test_nonisotropictransition()
unsigned next = 0; unsigned next = 0;
bool accepted = entry.accept(0, neighborhood, next); bool accepted = entry.accept(0, neighborhood, next);
QVERIFY(accepted); QVERIFY(accepted);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
...@@ -93,7 +93,7 @@ void CellulutTests::test_nonisotropictransition() ...@@ -93,7 +93,7 @@ void CellulutTests::test_nonisotropictransition()
neighborhood.addNeighbor({0, -1}, 1); // index 0 neighborhood.addNeighbor({0, -1}, 1); // index 0
neighborhood.addNeighbor({-1, 0}, 0); // index 1 neighborhood.addNeighbor({-1, 0}, 0); // index 1
unsigned next = rule.getState(0, neighborhood); unsigned next = rule.getState(0, neighborhood);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
...@@ -103,7 +103,7 @@ void CellulutTests::test_nonisotropictransition() ...@@ -103,7 +103,7 @@ void CellulutTests::test_nonisotropictransition()
neighborhood.addNeighbor({0, -1}, 0); // index 0 neighborhood.addNeighbor({0, -1}, 0); // index 0
neighborhood.addNeighbor({-1, 0}, 1); // index 1 neighborhood.addNeighbor({-1, 0}, 1); // index 1
unsigned next = rule.getState(0, neighborhood); unsigned next = rule.getState(0, neighborhood);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
Neighborhood neighborhood; Neighborhood neighborhood;
...@@ -112,7 +112,7 @@ void CellulutTests::test_nonisotropictransition() ...@@ -112,7 +112,7 @@ void CellulutTests::test_nonisotropictransition()
neighborhood.addNeighbor({0, -1}, 0); // index 0 neighborhood.addNeighbor({0, -1}, 0); // index 0
neighborhood.addNeighbor({-1, 0}, 0); // index 1 neighborhood.addNeighbor({-1, 0}, 0); // index 1
unsigned next = rule.getState(0, neighborhood); unsigned next = rule.getState(0, neighborhood);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
Neighborhood neighborhood; Neighborhood neighborhood;
...@@ -121,7 +121,7 @@ void CellulutTests::test_nonisotropictransition() ...@@ -121,7 +121,7 @@ void CellulutTests::test_nonisotropictransition()
neighborhood.addNeighbor({0, -1}, 0); // index 0 neighborhood.addNeighbor({0, -1}, 0); // index 0
neighborhood.addNeighbor({-1, 0}, 0); // index 1 neighborhood.addNeighbor({-1, 0}, 0); // index 1
unsigned next = rule.getState(0, neighborhood); unsigned next = rule.getState(0, neighborhood);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
Neighborhood neighborhood; Neighborhood neighborhood;
...@@ -130,7 +130,7 @@ void CellulutTests::test_nonisotropictransition() ...@@ -130,7 +130,7 @@ void CellulutTests::test_nonisotropictransition()
neighborhood.addNeighbor({0, -1}, 1); // index 0 neighborhood.addNeighbor({0, -1}, 1); // index 0
neighborhood.addNeighbor({-1, 0}, 0); // index 1 neighborhood.addNeighbor({-1, 0}, 0); // index 1
unsigned next = rule.getState(0, neighborhood); unsigned next = rule.getState(0, neighborhood);
QCOMPARE(next, 0); QCOMPARE(next, 0u);
} }
} }
} }
...@@ -28,7 +28,7 @@ void CellulutTests::test_property() ...@@ -28,7 +28,7 @@ void CellulutTests::test_property()
test.coords.load_from_neighborhood(n); test.coords.load_from_neighborhood(n);
QCOMPARE(test.coords.size(), 3); QCOMPARE(test.coords.size(), 3ul);
for (unsigned i = 0; i < test.coords.size(); ++i) for (unsigned i = 0; i < test.coords.size(); ++i)
{ {
CoordinateProperty& coord = static_cast<CoordinateProperty&>(test.coords.at(i)); CoordinateProperty& coord = static_cast<CoordinateProperty&>(test.coords.at(i));
......
...@@ -24,8 +24,8 @@ void CellulutTests::test_structure() ...@@ -24,8 +24,8 @@ void CellulutTests::test_structure()
QVERIFY(std::is_permutation(normalized_coords.begin(), normalized_coords.end(), s1.begin())); QVERIFY(std::is_permutation(normalized_coords.begin(), normalized_coords.end(), s1.begin()));
QVERIFY(std::is_permutation(normalized_coords.begin(), normalized_coords.end(), s2.begin())); QVERIFY(std::is_permutation(normalized_coords.begin(), normalized_coords.end(), s2.begin()));
QCOMPARE(s1.width(), 3); QCOMPARE(s1.width(), 3ul);
QCOMPARE(s1.height(), 2); QCOMPARE(s1.height(), 2ul);
s1.load(empty.begin(), empty.end()); s1.load(empty.begin(), empty.end());
QVERIFY(s1.size() == 0); QVERIFY(s1.size() == 0);
...@@ -40,8 +40,8 @@ void CellulutTests::test_structure() ...@@ -40,8 +40,8 @@ void CellulutTests::test_structure()
QCOMPARE(s1.size(), coords.size()); // 2 cellules non nulles, on ignore les cellules à zéro qui sont toujours implicites QCOMPARE(s1.size(), coords.size()); // 2 cellules non nulles, on ignore les cellules à zéro qui sont toujours implicites
QVERIFY(std::is_permutation(normalized_coords.begin(), normalized_coords.end(), s1.begin())); QVERIFY(std::is_permutation(normalized_coords.begin(), normalized_coords.end(), s1.begin()));
QCOMPARE(s1.width(), 3); QCOMPARE(s1.width(), 3ul);
QCOMPARE(s1.height(), 2); QCOMPARE(s1.height(), 2ul);
} }
} }
...@@ -39,7 +39,7 @@ void CellulutTests::test_rle_structurereader() ...@@ -39,7 +39,7 @@ void CellulutTests::test_rle_structurereader()
try { try {
Structure stru = rle.read_structure(); Structure stru = rle.read_structure();
QCOMPARE(stru.size(), 5); QCOMPARE(stru.size(), 5ul);
QVERIFY(std::count(stru.begin(), stru.end(), std::make_pair<Coord, unsigned>(Coord{1, 0}, 1)) == 1); QVERIFY(std::count(stru.begin(), stru.end(), std::make_pair<Coord, unsigned>(Coord{1, 0}, 1)) == 1);
} }
catch (const std::exception& ex) catch (const std::exception& ex)
...@@ -55,7 +55,7 @@ void CellulutTests::test_rle_structurereader() ...@@ -55,7 +55,7 @@ void CellulutTests::test_rle_structurereader()
try { try {
Structure stru = rle.read_structure(); Structure stru = rle.read_structure();
QCOMPARE(stru.size(), 36); QCOMPARE(stru.size(), 36ul);
} }
catch (const std::exception& ex) catch (const std::exception& ex)
{ {
...@@ -70,7 +70,7 @@ void CellulutTests::test_rle_structurereader() ...@@ -70,7 +70,7 @@ void CellulutTests::test_rle_structurereader()
try { try {
Structure stru = rle.read_structure(); Structure stru = rle.read_structure();
QCOMPARE(stru.size(), 16); QCOMPARE(stru.size(), 16ul);
std::map<int, int> state_count; std::map<int, int> state_count;
for (auto pair : stru) for (auto pair : stru)
...@@ -96,7 +96,7 @@ void CellulutTests::test_json_structurereader() ...@@ -96,7 +96,7 @@ void CellulutTests::test_json_structurereader()
try { try {
Structure stru = rle.read_structure(); Structure stru = rle.read_structure();
QCOMPARE(stru.size(), 2); QCOMPARE(stru.size(), 2ul);
QVERIFY(std::count(stru.begin(), stru.end(), std::make_pair<Coord, unsigned>(Coord{0, 0}, 1)) == 1); QVERIFY(std::count(stru.begin(), stru.end(), std::make_pair<Coord, unsigned>(Coord{0, 0}, 1)) == 1);
QVERIFY(std::count(stru.begin(), stru.end(), std::make_pair<Coord, unsigned>(Coord{2, 3}, 3)) == 1); QVERIFY(std::count(stru.begin(), stru.end(), std::make_pair<Coord, unsigned>(Coord{2, 3}, 3)) == 1);
} }
......
...@@ -28,7 +28,7 @@ void CellulutTests::test_totalistictransition() ...@@ -28,7 +28,7 @@ void CellulutTests::test_totalistictransition()
unsigned next = 0; unsigned next = 0;
bool accepted = entry.accept(0, neighborhood, next); bool accepted = entry.accept(0, neighborhood, next);
QVERIFY(accepted); QVERIFY(accepted);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
...@@ -42,7 +42,7 @@ void CellulutTests::test_totalistictransition() ...@@ -42,7 +42,7 @@ void CellulutTests::test_totalistictransition()
unsigned next = 0; unsigned next = 0;
bool accepted = entry.accept(1, neighborhood, next); bool accepted = entry.accept(1, neighborhood, next);
QVERIFY(accepted); QVERIFY(accepted);
QCOMPARE(next, 2); QCOMPARE(next, 2u);
} }
{ {
...@@ -56,7 +56,7 @@ void CellulutTests::test_totalistictransition() ...@@ -56,7 +56,7 @@ void CellulutTests::test_totalistictransition()
unsigned next = 0; unsigned next = 0;
bool accepted = entry.accept(2, neighborhood, next); bool accepted = entry.accept(2, neighborhood, next);
QVERIFY(accepted); QVERIFY(accepted);
QCOMPARE(next, 0); QCOMPARE(next, 0u);
} }
{ {
...@@ -83,7 +83,7 @@ void CellulutTests::test_totalistictransition() ...@@ -83,7 +83,7 @@ void CellulutTests::test_totalistictransition()
unsigned next = 1; unsigned next = 1;
bool accepted = entry.accept(1, neighborhood, next); bool accepted = entry.accept(1, neighborhood, next);
QVERIFY(accepted); QVERIFY(accepted);
QCOMPARE(next, 0); QCOMPARE(next, 0u);
} }
{ {
...@@ -104,13 +104,13 @@ void CellulutTests::test_totalistictransition() ...@@ -104,13 +104,13 @@ void CellulutTests::test_totalistictransition()
neighborhood.addNeighbor({0, -1}, 1); neighborhood.addNeighbor({0, -1}, 1);
neighborhood.addNeighbor({-1, 0}, 2); neighborhood.addNeighbor({-1, 0}, 2);
unsigned next = rule.getState(0, neighborhood); unsigned next = rule.getState(0, neighborhood);
QCOMPARE(next, 0); QCOMPARE(next, 0u);
next = rule.getState(1, neighborhood); next = rule.getState(1, neighborhood);
QCOMPARE(next, 2); QCOMPARE(next, 2u);
next = rule.getState(2, neighborhood); next = rule.getState(2, neighborhood);
QCOMPARE(next, 3); QCOMPARE(next, 3u);
next = rule.getState(3, neighborhood); next = rule.getState(3, neighborhood);
QCOMPARE(next, 1); QCOMPARE(next, 1u);
} }
{ {
...@@ -120,13 +120,13 @@ void CellulutTests::test_totalistictransition() ...@@ -120,13 +120,13 @@ void CellulutTests::test_totalistictransition()
neighborhood.addNeighbor({0, -1}, 1); neighborhood.addNeighbor({0, -1}, 1);
neighborhood.addNeighbor({-1, 0}, 1); neighborhood.addNeighbor({-1, 0}, 1);
unsigned next = rule.getState(0, neighborhood); unsigned next = rule.getState(0, neighborhood);
QCOMPARE(next, 0); QCOMPARE(next, 0u);
next = rule.getState(1, neighborhood); next = rule.getState(1, neighborhood);