From 543afdc4e2a7952b45219cf5dfafa833947a329b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 2 Sep 2018 13:19:52 +0200 Subject: [PATCH] Obj-Import: add missing unittest for poiuntcloud support. --- test/models/OBJ/point_cloud.obj | 17 +++++++++++++++++ test/unit/utObjImportExport.cpp | 7 +++++++ 2 files changed, 24 insertions(+) create mode 100644 test/models/OBJ/point_cloud.obj diff --git a/test/models/OBJ/point_cloud.obj b/test/models/OBJ/point_cloud.obj new file mode 100644 index 000000000..e65f20abc --- /dev/null +++ b/test/models/OBJ/point_cloud.obj @@ -0,0 +1,17 @@ +#### +# +# OBJ File Generated by Meshlab +# +#### +# Object up.obj +# +# Vertices: 3 +# Faces: 0 +# +#### +vn -0.281034 -0.057252 0.957989 +v -0.207717 -0.953997 2.554110 +vn -0.139126 -0.135672 0.980937 +v -0.275607 -0.965401 2.541530 +vn -0.163133 -0.131576 0.977791 +v -0.270155 -0.963170 2.548000 diff --git a/test/unit/utObjImportExport.cpp b/test/unit/utObjImportExport.cpp index 5a10ae17b..f0b20fb7f 100644 --- a/test/unit/utObjImportExport.cpp +++ b/test/unit/utObjImportExport.cpp @@ -389,3 +389,10 @@ TEST_F( utObjImportExport, mtllib_after_g ) { ASSERT_EQ(aiReturn_SUCCESS, mat->Get(AI_MATKEY_NAME, name)); EXPECT_STREQ("MyMaterial", name.C_Str()); } + +TEST_F(utObjImportExport, import_point_cloud) { + ::Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/OBJ/point_cloud.obj", 0 ); + ASSERT_NE(nullptr, scene); +} +