reformat unittests.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user