From 55fcbddde8205acb9832ccd5fc441b70ff6f537e Mon Sep 17 00:00:00 2001 From: John Beard Date: Tue, 29 Jan 2019 17:38:31 +0000 Subject: [PATCH] QA: Fix faulty test of SHAPE_POLY_SET Collision This test assumed points on a edge are counted as colliding. This is not true: points on an edge are NOT counted at inside the poly_set. THe test does still consider points on a *hole* edge as collisions. The API to SHAPE_POLY_SET is unclear on if this is correct. --- qa/common/geometry/test_shape_poly_set_collision.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/common/geometry/test_shape_poly_set_collision.cpp b/qa/common/geometry/test_shape_poly_set_collision.cpp index 46de3db4b4..828679d25d 100644 --- a/qa/common/geometry/test_shape_poly_set_collision.cpp +++ b/qa/common/geometry/test_shape_poly_set_collision.cpp @@ -57,11 +57,11 @@ struct CollisionFixture // On a hole edge => inside the polygon collidingPoints.push_back( VECTOR2I( 40, 25 ) ); - // On the outline edge => inside the polygon - collidingPoints.push_back( VECTOR2I( 0, 10 ) ); - // Create points not colliding with the poly set. + // On the outline edge => outside the polygon + nonCollidingPoints.push_back( VECTOR2I( 0, 10 ) ); + // Completely outside of the polygon nonCollidingPoints.push_back( VECTOR2I( 200, 200 ) );