From 799870e0ae6875029f52bcd49ae453b755ccee76 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 28 Sep 2014 21:01:03 +1000 Subject: New polyfill test (fails - cause of T41986) --- tests/gtests/blenlib/BLI_polyfill2d_test.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/gtests/blenlib/BLI_polyfill2d_test.cc b/tests/gtests/blenlib/BLI_polyfill2d_test.cc index 4f000429e1f..57a79456055 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); +} -- cgit v1.2.3