diff --git a/test/unit/utglTF2ImportExport.cpp b/test/unit/utglTF2ImportExport.cpp index 35b6030da..e7d214ebd 100644 --- a/test/unit/utglTF2ImportExport.cpp +++ b/test/unit/utglTF2ImportExport.cpp @@ -145,6 +145,19 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeTrianglesStrip) { } } +TEST_F(utglTF2ImportExport, importglTF2PrimitiveModePoints) { + Assimp::Importer importer; + //Line loop + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.gltf", aiProcess_ValidateDataStructure); + EXPECT_NE(nullptr, scene); + EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 1024); + for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) + { + EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mNumIndices, 1); + EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[0], i); + } +} + TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeLineLoop) { Assimp::Importer importer; //Line loop @@ -153,7 +166,7 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeLineLoop) { EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4); std::array l1 = { 0, 3, 2, 1, 0}; EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 2); - for (int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) + for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) { EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[0], l1[i]); EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[1], l1[i+1]); @@ -168,7 +181,7 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeLines) { EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4); std::array l1 = { 0, 3, 2, 1, 0 }; EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 2); - for (int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) + for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) { EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[0], l1[i]); EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[1], l1[i + 1]); @@ -183,7 +196,7 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeLineStrip) { EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4); std::array l1 = { 0, 3, 2, 1, 0 }; EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 2); - for (int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) + for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) { EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[0], l1[i]); EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[1], l1[i + 1]);