Page MenuHomePhabricator

Enhance Unittest for PlanarPolygon to test self-intersection checks
Closed, WontfixPublic

Description

Commit 26395 introduced a check for self-intersecting polygons. The code is not straigtforward but involves some equations which can easily implemented in a way that does not work like expected.

A unit test should verify that the checks are working correctly.

Event Timeline

Testing bugs are part of their respective modules -> changing component to other, please assign appropriate component.

Resetting all bugs without active assignee flag to "CONFIRMED". Change status to IN_PROGRESS if you are working on it.

@Daniel: after some reassignments of this bug I think you can estimate the best how important this is. Is the intersection code still used? In critical functions?

(In reply to Marco Nolden from comment #3)

@Daniel: after some reassignments of this bug I think you can estimate the
best how important this is. Is the intersection code still used? In critical
functions?

This would definitely be a useful test. The intersection test is still in use (see code of PlanarPolygon). If self-intersection is detected, no features such as "area" are evaluated. Since these features are not intuitive for self-intersecting figures, their non-calculation is meaningful.

I don't know of "critical" functions that are untested.

We should definitly write a unit test for this. This is still relevant.

kislinsk claimed this task.
kislinsk added a subscriber: kislinsk.
This task was automatically closed because it wasn't updated at least since July 2016 (over 2 years). Please re-open this task if you think that it is still relevant. This most probably means that you will resolve it.