From 76534cb8d07813b9f5528ad621423d982b5f2c28 Mon Sep 17 00:00:00 2001 From: Ben Cragg Date: Sun, 10 May 2020 14:24:07 +0100 Subject: [PATCH] Removing commented out tests --- geometry_test.go | 60 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/geometry_test.go b/geometry_test.go index 91cf81e..da63314 100644 --- a/geometry_test.go +++ b/geometry_test.go @@ -1279,36 +1279,36 @@ func TestLine_IntersectRect(t *testing.T) { args args want pixel.Vec }{ - //{ - // name: "Line through rect vertically", - // fields: fields{A: pixel.V(0, 0), B: pixel.V(0, 10)}, - // args: args{r: pixel.R(-1, 1, 5, 5)}, - // want: pixel.V(-1, 0), - //}, - //{ - // name: "Line through rect horizontally", - // fields: fields{A: pixel.V(0, 1), B: pixel.V(10, 1)}, - // args: args{r: pixel.R(1, 0, 5, 5)}, - // want: pixel.V(0, -1), - //}, - //{ - // name: "Line through rect diagonally bottom and left edges", - // fields: fields{A: pixel.V(0, 0), B: pixel.V(10, 10)}, - // args: args{r: pixel.R(0, 2, 3, 3)}, - // want: pixel.V(-1, 1), - //}, - //{ - // name: "Line through rect diagonally top and right edges", - // fields: fields{A: pixel.V(10, 0), B: pixel.V(0, 10)}, - // args: args{r: pixel.R(5, 0, 8, 3)}, - // want: pixel.V(-2.5, -2.5), - //}, - //{ - // name: "Line with not rect intersect", - // fields: fields{A: pixel.V(0, 0), B: pixel.V(10, 10)}, - // args: args{r: pixel.R(20, 20, 21, 21)}, - // want: pixel.ZV, - //}, + { + name: "Line through rect vertically", + fields: fields{A: pixel.V(0, 0), B: pixel.V(0, 10)}, + args: args{r: pixel.R(-1, 1, 5, 5)}, + want: pixel.V(-1, 0), + }, + { + name: "Line through rect horizontally", + fields: fields{A: pixel.V(0, 1), B: pixel.V(10, 1)}, + args: args{r: pixel.R(1, 0, 5, 5)}, + want: pixel.V(0, -1), + }, + { + name: "Line through rect diagonally bottom and left edges", + fields: fields{A: pixel.V(0, 0), B: pixel.V(10, 10)}, + args: args{r: pixel.R(0, 2, 3, 3)}, + want: pixel.V(-1, 1), + }, + { + name: "Line through rect diagonally top and right edges", + fields: fields{A: pixel.V(10, 0), B: pixel.V(0, 10)}, + args: args{r: pixel.R(5, 0, 8, 3)}, + want: pixel.V(-2.5, -2.5), + }, + { + name: "Line with not rect intersect", + fields: fields{A: pixel.V(0, 0), B: pixel.V(10, 10)}, + args: args{r: pixel.R(20, 20, 21, 21)}, + want: pixel.ZV, + }, { name: "Line intersects at 0,0", fields: fields{A: pixel.V(0, -10), B: pixel.V(0, 10)},