reformat unittests.

This commit is contained in:
Kim Kulling
2020-03-22 12:13:09 +01:00
parent edc73552cd
commit 68a9fa2df3
77 changed files with 2555 additions and 1632 deletions

View File

@@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -47,20 +45,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace ::std;
using namespace ::Assimp;
class GenNormalsTest : public ::testing::Test
{
class GenNormalsTest : public ::testing::Test {
public:
virtual void SetUp();
virtual void TearDown();
protected:
aiMesh* pcMesh;
GenVertexNormalsProcess* piProcess;
aiMesh *pcMesh;
GenVertexNormalsProcess *piProcess;
};
// ------------------------------------------------------------------------------------------------
void GenNormalsTest::SetUp()
{
void GenNormalsTest::SetUp() {
piProcess = new GenVertexNormalsProcess();
pcMesh = new aiMesh();
pcMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
@@ -72,21 +68,19 @@ void GenNormalsTest::SetUp()
pcMesh->mFaces[0].mIndices[2] = 1;
pcMesh->mNumVertices = 3;
pcMesh->mVertices = new aiVector3D[3];
pcMesh->mVertices[0] = aiVector3D(0.0f,1.0f,6.0f);
pcMesh->mVertices[1] = aiVector3D(2.0f,3.0f,1.0f);
pcMesh->mVertices[2] = aiVector3D(3.0f,2.0f,4.0f);
pcMesh->mVertices[0] = aiVector3D(0.0f, 1.0f, 6.0f);
pcMesh->mVertices[1] = aiVector3D(2.0f, 3.0f, 1.0f);
pcMesh->mVertices[2] = aiVector3D(3.0f, 2.0f, 4.0f);
}
// ------------------------------------------------------------------------------------------------
void GenNormalsTest::TearDown()
{
void GenNormalsTest::TearDown() {
delete this->pcMesh;
delete this->piProcess;
}
// ------------------------------------------------------------------------------------------------
TEST_F(GenNormalsTest, testSimpleTriangle)
{
TEST_F(GenNormalsTest, testSimpleTriangle) {
piProcess->GenMeshVertexNormals(pcMesh, 0);
EXPECT_TRUE(pcMesh->mNormals != NULL);
}