Browse Source

fixed suzanne test

Vicente Penades 3 years ago
parent
commit
ca54407dfa
1 changed files with 7 additions and 3 deletions
  1. 7 3
      tests/SharpGLTF.Core.Tests/Schema2/LoadAndSave/RegressionTests.cs

+ 7 - 3
tests/SharpGLTF.Core.Tests/Schema2/LoadAndSave/RegressionTests.cs

@@ -17,11 +17,15 @@ namespace SharpGLTF.Schema2.LoadAndSave
         {
             var path = TestFiles.GetSampleModelsPaths().First(item => item.EndsWith("Suzanne.gltf"));
 
-            var suzanne = ModelRoot.Load(path, ValidationMode.TryFix);
+            var suzanne1 = ModelRoot.Load(path, ValidationMode.TryFix);
 
-            path = suzanne.AttachToCurrentTest("suzanne.glb");
+            path = suzanne1.AttachToCurrentTest("suzanne.glb");
 
-            Assert.Less(1024*1024, new System.IO.FileInfo(path).Length);
+            var suzanne2 = ModelRoot.Load(path);
+
+            Assert.AreEqual(suzanne1.LogicalMeshes.Count, suzanne2.LogicalMeshes.Count);
+
+            Assert.Less( new System.IO.FileInfo(path).Length, 1024*512);
         }
     }
 }