瀏覽代碼

+ add two malformed obj files. Currently those will crash Assimp.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@981 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 14 年之前
父節點
當前提交
785b2c0ac3
共有 3 個文件被更改,包括 66 次插入1 次删除
  1. 30 0
      test/models/invalid/malformed.obj
  2. 30 0
      test/models/invalid/malformed2.obj
  3. 6 1
      test/models/invalid/readme.txt

+ 30 - 0
test/models/invalid/malformed.obj

@@ -0,0 +1,30 @@
+#	                Vertices: 8
+#	                  Points: 0
+#	                   Lines: 0
+#	                   Faces: 6
+#	               Materials: 1
+
+o 1
+
+# Vertex list
+
+v -0.5 -0.5 0.5
+v -0.5 -0.5 -0.5
+v -0.5 0.5 -0.5
+v -0.5 0.5 0.5
+v 0.5 -0.5 0.5
+v 0.5 -0.5 -0.5
+v 0.5 0.5 -0.5
+v 0.5 0.5 0.5
+
+# Point/Line/Face list
+
+usemtl Default
+f 4 12 2 1
+f 2 6 5 1
+f -1 7 6 2
+f 8 7 3 4
+f 5 8 8 1
+f 0 7 8 5
+
+# End of file

+ 30 - 0
test/models/invalid/malformed2.obj

@@ -0,0 +1,30 @@
+#	                Vertices: 8
+#	                  Points: 0
+#	                   Lines: 0
+#	                   Faces: 6
+#	               Materials: 1
+
+o -1
+
+# Vertex list
+
+v -0.5 -0.5 0.5
+v -0.5 -0.5 -0.5
+v -0.5 0.5 -0.5
+v -0.5 0.5 0.5
+v 0.5 -0.5 0.5
+v 0.5 -0.5 -0.5
+v 0.5 0.5 -0.5
+v 0.5 0.5 0.5
+
+# Point/Line/Face list
+
+usemtl DefaultDoesNotExist
+f
+f 2 6 5 1
+f 3 7 6 2
+f 8 7 3 4
+f 5 8 4 1
+f 6 7 8 5
+
+# End of file

+ 6 - 1
test/models/invalid/readme.txt

@@ -6,7 +6,9 @@ GENERAL
 
 The files in this directory are invalid ... some of them are empty, 
 others have invalid vertices or faces, others are prepared to make
- assimp allocate a few hundreds gigs of memory ...
+ assimp allocate a few hundreds gigs of memory ... most are 
+actually regression tests, i.e. there was once a bugfix that
+fixed the respective loaders.
 
 This test case is successful if the library (and the viewer) don't
 crash.
@@ -23,4 +25,7 @@ OutOfMemory.off - the number of faces is invalid. There won't be
 empty.<x> - These files are completely empty. The corresponding
    loaders should not crash.
 
+malformed.obj - out-of-range vertex indices
+malformed2.obj - non-existent material referenced
+