From bd80e92f788215708b5a0b7f3600c6d69df5c1ce Mon Sep 17 00:00:00 2001 From: Alexandre Avenel Date: Sun, 4 Mar 2018 12:42:21 +0100 Subject: [PATCH] Add PLY loader unit test for binary files --- test/models/PLY/cube_binary.ply | Bin 0 -> 447 bytes test/unit/utPLYImportExport.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 test/models/PLY/cube_binary.ply diff --git a/test/models/PLY/cube_binary.ply b/test/models/PLY/cube_binary.ply new file mode 100644 index 0000000000000000000000000000000000000000..14d29ebd86d5be53fedd1933abe9b1bf95671c59 GIT binary patch literal 447 zcmZvW!EVAZ5JUrMLGoAZ7gSA8+>qdakb34C8D|5Q949iSBAobic8tmMeshes[0]->HasTextureCoords(0)); } +TEST_F(utPLYImportExport, importBinaryPLY) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/PLY/cube_binary.ply", 0); + + EXPECT_NE(nullptr, scene); + EXPECT_NE(nullptr, scene->mMeshes[0]); + //This test model is double sided, so 12 faces instead of 6 + EXPECT_EQ(12u, scene->mMeshes[0]->mNumFaces); +} + TEST_F( utPLYImportExport, vertexColorTest ) { Assimp::Importer importer; const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/PLY/float-color.ply", aiProcess_ValidateDataStructure);