Skip to content

Commit

Permalink
COMP: Add test for correct value of GetNameOfClass()
Browse files Browse the repository at this point in the history
The result of GetNameOfClass() was ignored in the tests.
The value is now checked to ensure that the correct values are used.
  • Loading branch information
hjmjohnson committed Apr 12, 2024
1 parent 95b8a6f commit e126823
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest(int argc, char * argv[])
}
std::cout << "OK" << std::endl;

(void)deleteCenterVertex->GetNameOfClass();
const std::string className = deleteCenterVertex->GetNameOfClass();
const std::string requiredClassName{ "QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction" };
if (className != requiredClassName)
{
std::cout << className << " != " << requiredClassName << std::endl;
return EXIT_FAILURE;
}

deleteCenterVertex->SetInput(mesh);
std::cout << " "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ itkQuadEdgeMeshEulerOperatorJoinFacetTest(int, char *[])
std::cout << "OK" << std::endl;
#endif

(void)joinFacet->GetNameOfClass();

const std::string className = joinFacet->GetNameOfClass();
const std::string requiredClassName{ "QuadEdgeMeshEulerOperatorJoinFacetFunction" };
if (className != requiredClassName)
{
std::cout << className << " != " << requiredClassName << std::endl;
return EXIT_FAILURE;
}
joinFacet->SetInput(mesh);

#ifndef NDEBUG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,13 @@ itkQuadEdgeMeshEulerOperatorJoinVertexTest(int argc, char * argv[])
std::cout << "OK" << std::endl;
#endif

(void)joinVertex->GetNameOfClass();
const std::string className = joinVertex->GetNameOfClass();
const std::string requiredClassName{ "QuadEdgeMeshEulerOperatorJoinVertexFunction" };
if (className != requiredClassName)
{
std::cout << className << " != " << requiredClassName << std::endl;
return EXIT_FAILURE;
}

joinVertex->SetInput(mesh);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ itkQuadEdgeMeshEulerOperatorSplitEdgeTest(int, char *[])
}
std::cout << "OK" << std::endl;

(void)splitEdge->GetNameOfClass();

const std::string className = splitEdge->GetNameOfClass();
const std::string requiredClassName{ "QuadEdgeMeshEulerOperatorSplitEdgeFunction" };
if (className != requiredClassName)
{
std::cout << className << " != " << requiredClassName << std::endl;
return EXIT_FAILURE;
}
splitEdge->SetInput(mesh);
std::cout << " "
<< "Test No QE Input";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ itkQuadEdgeMeshEulerOperatorSplitVertexTest(int, char *[])
}
std::cout << "OK" << std::endl;

(void)splitVertex->GetNameOfClass();
const std::string className = splitVertex->GetNameOfClass();
const std::string requiredClassName{ "QuadEdgeMeshEulerOperatorSplitVertexFunction" };
if (className != requiredClassName)
{
std::cout << className << " != " << requiredClassName << std::endl;
return EXIT_FAILURE;
}

splitVertex->SetInput(mesh);
std::cout << " "
Expand Down

0 comments on commit e126823

Please sign in to comment.