opensurgsim
Classes | Functions
TetrahedronMeshTest.cpp File Reference

Tests for the Tetrahedron class. More...

#include "gtest/gtest.h"
#include "SurgSim/DataStructures/EmptyData.h"
#include "SurgSim/DataStructures/Vertex.h"
#include "SurgSim/DataStructures/MeshElement.h"
#include "SurgSim/DataStructures/UnitTests/MockObjects.h"
#include <random>

Classes

class  TetrahedronMeshTest
 

Functions

 TEST_F (TetrahedronMeshTest, InitTest)
 
 TEST_F (TetrahedronMeshTest, CreateVerticesTest)
 
 TEST_F (TetrahedronMeshTest, isValidTest)
 
 TEST_F (TetrahedronMeshTest, SetVertexPositionsTest)
 
 TEST_F (TetrahedronMeshTest, ClearTest)
 
 TEST_F (TetrahedronMeshTest, UpdateTest)
 
 TEST_F (TetrahedronMeshTest, ComparisonTest)
 

Detailed Description

Tests for the Tetrahedron class.

Function Documentation

§ TEST_F() [1/6]

TEST_F ( TetrahedronMeshTest  ,
InitTest   
)

Make sure we can create triangle meshes with each possible combination of void data. One void entry

Two void entries

Three void entries

Four void entries

§ TEST_F() [2/6]

TEST_F ( TetrahedronMeshTest  ,
CreateVerticesTest   
)

Create the test vertices

Make sure each vertex is set properly

Create the test edges

Make sure each vertex is set properly

Create the test triangles

Make sure each vertex is set properly

Create the test tetrahedrons

Make sure each tetrahedron is set properly

§ TEST_F() [3/6]

TEST_F ( TetrahedronMeshTest  ,
isValidTest   
)

Create the edges (no vertices yet => the mesh is NOT valid)

Create the triangles (no vertices yet => the mesh is NOT valid)

Create the tetrahedrons (no vertices yet => the mesh is NOT valid)

Create the vertices

§ TEST_F() [4/6]

TEST_F ( TetrahedronMeshTest  ,
SetVertexPositionsTest   
)

Create vertices with test normals, but all positions at (0,0,0)

Make sure each vertex is set properly

Test the individual set/get methods

Make sure each vertex is set properly

Try setting with wrong number of vertices

§ TEST_F() [5/6]

TEST_F ( TetrahedronMeshTest  ,
ClearTest   
)

Create mesh using test data

Clear mesh

§ TEST_F() [6/6]

TEST_F ( TetrahedronMeshTest  ,
ComparisonTest   
)

Create mesh using test data

Create same mesh again

Create mesh with test data, but each vertex has position and normal of (0,0,0) to make them different

Create mesh with test data, but reverse each edge's vertex order to make them different

Create mesh with test data, but only create half of the triangles to make the list different.

Test comparisons