diff --git a/test/models/X3D/IndexedLineSet.x3d b/test/models/X3D/IndexedLineSet.x3d
new file mode 100644
index 000000000..ed865ebb7
--- /dev/null
+++ b/test/models/X3D/IndexedLineSet.x3d
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/unit/utX3DImportExport.cpp b/test/unit/utX3DImportExport.cpp
index f2df81ac2..a654765de 100644
--- a/test/unit/utX3DImportExport.cpp
+++ b/test/unit/utX3DImportExport.cpp
@@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include
#include
+#include
using namespace Assimp;
@@ -59,3 +60,16 @@ public:
TEST_F(utX3DImportExport, importX3DFromFileTest) {
EXPECT_TRUE(importerTest());
}
+
+TEST_F(utX3DImportExport, importX3DIndexedLineSet) {
+ Assimp::Importer importer;
+ const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X3D/IndexedLineSet.x3d", aiProcess_ValidateDataStructure);
+ ASSERT_NE(nullptr, scene);
+ ASSERT_EQ(scene->mNumMeshes, 1u);
+ ASSERT_EQ(scene->mMeshes[0]->mNumFaces, 4u);
+ ASSERT_EQ(scene->mMeshes[0]->mPrimitiveTypes, aiPrimitiveType_LINE);
+ ASSERT_EQ(scene->mMeshes[0]->mNumVertices, 4u);
+ for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; i++) {
+ ASSERT_EQ(scene->mMeshes[0]->mFaces[i].mNumIndices, 2u);
+ }
+}