[Bf-blender-cvs] [799870e] gtest-staging: New polyfill test (fails - cause of T41986)

Campbell Barton noreply at git.blender.org
Sun Sep 28 13:06:03 CEST 2014


Commit: 799870e0ae6875029f52bcd49ae453b755ccee76
Author: Campbell Barton
Date:   Sun Sep 28 21:01:03 2014 +1000
Branches: gtest-staging
https://developer.blender.org/rB799870e0ae6875029f52bcd49ae453b755ccee76

New polyfill test (fails - cause of T41986)

===================================================================

M	tests/gtests/blenlib/BLI_polyfill2d_test.cc

===================================================================

diff --git a/tests/gtests/blenlib/BLI_polyfill2d_test.cc b/tests/gtests/blenlib/BLI_polyfill2d_test.cc
index 4f00042..57a7945 100644
--- a/tests/gtests/blenlib/BLI_polyfill2d_test.cc
+++ b/tests/gtests/blenlib/BLI_polyfill2d_test.cc
@@ -259,7 +259,7 @@ static void polyfill_to_obj(
 	}
 
 	for (i = 0; i < tris_tot; i++) {
-		fprintf(f, "f %u %u %u\n", UNPACK3OP(1 +, tris[i]));
+		fprintf(f, "f %u %u %u\n", UNPACK3_EX(1 +, tris[i], ));
 	}
 
 	fclose(f);
@@ -494,3 +494,18 @@ TEST(polyfill2d, TestIssueT40777_colinear)
 	    {0, 1}, {0, 0}, {0.03, 0}, {0.03, 0.37}};
 	TEST_POLYFILL_TEMPLATE_STATIC(poly, false);
 }
+
+/* Blender bug T41986 */
+TEST(polyfill2d, TestIssueT41986_axis_align)
+{
+	float poly[][2] = {
+	    {-0.25, -0.07}, {-0.25, 0.27}, {-1.19, 0.14}, {-0.06, 0.73}, {0.17, 1.25}, {-0.25, 1.07},
+	    {-0.38, 1.02}, {-0.25, 0.94}, {-0.40, 0.90}, {-0.41, 0.86}, {-0.34, 0.83}, {-0.25, 0.82},
+	    {-0.66, 0.73}, {-0.56, 1.09}, {-0.25, 1.10}, {0.00, 1.31}, {-0.03, 1.47}, {-0.25, 1.53},
+	    {0.12, 1.62}, {0.36, 1.07}, {0.12, 0.67}, {0.29, 0.57}, {0.44, 0.45}, {0.57, 0.29},
+	    {0.66, 0.12}, {0.68, 0.06}, {0.57, -0.36}, {-0.25, -0.37}, {0.49, -0.74}, {-0.59, -1.21},
+	    {-0.25, -0.15}, {-0.46, -0.52}, {-1.08, -0.83}, {-1.45, -0.33}, {-1.25, -0.04},
+	};
+
+	TEST_POLYFILL_TEMPLATE_STATIC(poly, false);
+}




More information about the Bf-blender-cvs mailing list