opensurgsim
Classes | Functions
MeshTest.cpp File Reference

Tests for the Mesh class. More...

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

Classes

class  MeshTests
 

Functions

 TEST_F (MeshTests, InitTest)
 
 TEST_F (MeshTests, CreateVerticesTest)
 
 TEST_F (MeshTests, SetVertexPositionsTest)
 
 TEST_F (MeshTests, ClearTest)
 
 TEST_F (MeshTests, UpdateTest)
 
 TEST_F (MeshTests, ComparisonTest)
 

Detailed Description

Tests for the Mesh class.

Function Documentation

§ TEST_F() [1/5]

TEST_F ( MeshTests  ,
InitTest   
)

Check that we can also create a mesh with no data

§ TEST_F() [2/5]

TEST_F ( MeshTests  ,
CreateVerticesTest   
)

Create the test vertices

Make sure each vertex is set properly

§ TEST_F() [3/5]

TEST_F ( MeshTests  ,
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() [4/5]

TEST_F ( MeshTests  ,
ClearTest   
)

Create vertices

Clear mesh

§ TEST_F() [5/5]

TEST_F ( MeshTests  ,
ComparisonTest   
)

Create vertices using test positions and normals

Create same mesh again

Create vertices, each with position and normal of (0,0,0)

Test comparisons