Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CellulutLO21
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LO21_Pin_Noir_Boucher_Bouri_Detree
CellulutLO21
Commits
f917721b
Unverified
Commit
f917721b
authored
3 years ago
by
Merwane Bouri
Browse files
Options
Downloads
Patches
Plain Diff
Test Moore valide
parent
2664acd3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#79274
canceled
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/mooreNeighborhoodRule_test.cpp
+56
-1
56 additions, 1 deletion
tests/mooreNeighborhoodRule_test.cpp
with
56 additions
and
1 deletion
tests/mooreNeighborhoodRule_test.cpp
+
56
−
1
View file @
f917721b
...
...
@@ -5,5 +5,60 @@
#include
"mooreNeighborhoodRule.hpp"
void
CellulutTests
::
test_mooreNeighborhoodRule
()
{
mooreNeighborhoodRule
newMoore
;
Grid
g
(
11
,
11
);
Coord
cellule
=
{
5
,
5
};
Coord
pos1
=
{
5
,
6
};
Coord
pos2
=
{
6
,
5
};
Coord
pos3
=
{
5
,
4
};
Coord
pos4
=
{
4
,
5
};
Coord
pos
=
{
5
,
7
};
Coord
pos5
=
{
7
,
5
};
Coord
pos6
=
{
6
,
6
};
Coord
pos7
=
{
4
,
4
};
Coord
pos8
=
{
5
,
3
};
Coord
pos9
=
{
3
,
5
};
Coord
pos10
=
{
7
,
7
};
Coord
pos11
=
{
4
,
4
};
Coord
pos12
=
{
6
,
7
};
Coord
pos13
=
{
7
,
6
};
Coord
pos14
=
{
3
,
6
};
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
);
g
.
set_cell
(
pos
,
5
);
g
.
set_cell
(
pos5
,
6
);
g
.
set_cell
(
pos6
,
8
);
g
.
set_cell
(
pos7
,
8
);
g
.
set_cell
(
pos8
,
8
);
g
.
set_cell
(
pos9
,
4
);
g
.
set_cell
(
pos11
,
4
);
g
.
set_cell
(
pos10
,
7
);
g
.
set_cell
(
pos12
,
7
);
g
.
set_cell
(
pos13
,
4
);
g
.
set_cell
(
pos14
,
2
);
mooreNeighborhoodRule
newMoore
(
2
);
Neighborhood
v
=
newMoore
.
getNeighborhood
(
g
,
cellule
);
unsigned
int
nb_voi
=
v
.
getNb
(
3
);
unsigned
int
nb_voi2
=
v
.
getNb
(
5
);
unsigned
int
nb_voi3
=
v
.
getNb
(
2
);
unsigned
int
nb_voi4
=
v
.
getNb
(
8
);
unsigned
int
nb_voi5
=
v
.
getNb
(
7
);
unsigned
int
nb_voi6
=
v
.
getNb
(
4
);
QCOMPARE
(
nb_voi
,
2
);
QCOMPARE
(
nb_voi2
,
2
);
QCOMPARE
(
nb_voi3
,
2
);
QCOMPARE
(
nb_voi4
,
3
);
QCOMPARE
(
nb_voi5
,
2
);
QCOMPARE
(
nb_voi6
,
3
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment