Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenMesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenMesh
OpenMesh
Commits
83e7cb2c
Commit
83e7cb2c
authored
Jun 27, 2017
by
Martin Schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added check for internal properties to split_copy unittest
parent
ad950d46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/Unittests/unittests_split_copy.cc
src/Unittests/unittests_split_copy.cc
+12
-0
No files found.
src/Unittests/unittests_split_copy.cc
View file @
83e7cb2c
...
...
@@ -57,6 +57,7 @@ class OpenMeshSplitCopyPolyMesh : public OpenMeshBasePoly {
TEST_F
(
OpenMeshSplitCopyTriangleMesh
,
SplitCopyTriangleMesh
)
{
mesh_
.
clear
();
mesh_
.
request_face_status
();
// Add some vertices
Mesh
::
VertexHandle
vhandle
[
4
];
...
...
@@ -86,6 +87,8 @@ TEST_F(OpenMeshSplitCopyTriangleMesh, SplitCopyTriangleMesh) {
OpenMesh
::
FPropHandleT
<
int
>
fprop_int
;
mesh_
.
add_property
(
fprop_int
);
mesh_
.
property
(
fprop_int
,
fh
)
=
999
;
//set internal property
mesh_
.
status
(
fh
).
set_tagged
(
true
);
// split face with new vertex
mesh_
.
split_copy
(
fh
,
vhandle
[
3
]);
...
...
@@ -94,7 +97,10 @@ TEST_F(OpenMeshSplitCopyTriangleMesh, SplitCopyTriangleMesh) {
Mesh
::
FaceIter
f_it
=
mesh_
.
faces_begin
();
Mesh
::
FaceIter
f_end
=
mesh_
.
faces_end
();
for
(;
f_it
!=
f_end
;
++
f_it
)
{
EXPECT_EQ
(
999
,
mesh_
.
property
(
fprop_int
,
*
f_it
))
<<
"Different Property value"
;
EXPECT_TRUE
(
mesh_
.
status
(
*
f_it
).
tagged
())
<<
"Different internal property value"
;
}
}
/* splits a face that has a property in a poly mesh with split_copy
...
...
@@ -103,6 +109,7 @@ TEST_F(OpenMeshSplitCopyTriangleMesh, SplitCopyTriangleMesh) {
TEST_F
(
OpenMeshSplitCopyPolyMesh
,
SplitCopyPolymesh
)
{
mesh_
.
clear
();
mesh_
.
request_face_status
();
// Add some vertices
Mesh
::
VertexHandle
vhandle
[
5
];
...
...
@@ -134,6 +141,8 @@ TEST_F(OpenMeshSplitCopyPolyMesh, SplitCopyPolymesh) {
OpenMesh
::
FPropHandleT
<
int
>
fprop_int
;
mesh_
.
add_property
(
fprop_int
);
mesh_
.
property
(
fprop_int
,
fh
)
=
999
;
//set internal property
mesh_
.
status
(
fh
).
set_tagged
(
true
);
// split face with new vertex
mesh_
.
split_copy
(
fh
,
vhandle
[
4
]);
...
...
@@ -142,7 +151,10 @@ TEST_F(OpenMeshSplitCopyPolyMesh, SplitCopyPolymesh) {
PolyMesh
::
FaceIter
f_it
=
mesh_
.
faces_begin
();
PolyMesh
::
FaceIter
f_end
=
mesh_
.
faces_end
();
for
(;
f_it
!=
f_end
;
++
f_it
)
{
EXPECT_EQ
(
999
,
mesh_
.
property
(
fprop_int
,
*
f_it
))
<<
"Different Property value"
;
EXPECT_TRUE
(
mesh_
.
status
(
*
f_it
).
tagged
())
<<
"Different internal property value"
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment