added tests for rectangle intersection

This commit is contained in:
dm
2016-08-27 19:05:10 -07:00
parent d1b383fb45
commit ff52a9115c
2 changed files with 50 additions and 3 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ func TestLineIntersection(t *testing.T) {
{[]line{line{Point{5, 8}, Point{8, 5}}, line{Point{3, 7}, Point{7, 3}}}, Point{0, 0}},
}
for _, rt := range lineIntersectionTest {
actual := lineIntersection(rt.l[0], rt.l[1])
actual, _ := lineIntersection(rt.l[0], rt.l[1])
if actual != rt.expected {
t.Errorf(
"failed spiral:\n\texpected: %f\n\t actual: %f",