Skip to content

Commit

Permalink
add one more test related to issue #3
Browse files Browse the repository at this point in the history
  • Loading branch information
akavel committed Oct 8, 2014
1 parent 08844ca commit 69871f1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bugs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,16 @@ func TestBug3b(t *T) {
t.Errorf("expected %s, got %s", exp, result)
}
}

func TestBug3c(t *T) {
subject := polyclip.Polygon{{{1, 2}, {2, 2}, {2, 1}}}
clipping := polyclip.Polygon{
{{1, 2}, {2, 3}, {2, 2}},
{{2, 2}, {2, 3}, {3, 2}}}
result := dump(subject.Construct(polyclip.UNION, clipping))

exp := dump(polyclip.Polygon{{{1, 2}, {2, 3}, {3, 2}, {2, 2}, {2, 1}}})
if result != exp {
t.Errorf("expected %s, got %s", exp, result)
}
}

0 comments on commit 69871f1

Please sign in to comment.