From 237d77596ff9eb33b73cf71dc5b68a07aba87c10 Mon Sep 17 00:00:00 2001 From: Ben Cragg Date: Tue, 2 Apr 2019 13:48:43 +0100 Subject: [PATCH] WIP line tests --- geometry_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geometry_test.go b/geometry_test.go index 2b46b44..e2414b8 100644 --- a/geometry_test.go +++ b/geometry_test.go @@ -954,7 +954,9 @@ func TestLine_Formula(t *testing.T) { t.Errorf("Line.Formula() gotM = %v, want %v", gotM, tt.wantM) } if gotB != tt.wantB { - t.Errorf("Line.Formula() gotB = %v, want %v", gotB, tt.wantB) + if math.IsNaN(tt.wantB) && !math.IsNaN(gotB) { + t.Errorf("Line.Formula() gotB = %v, want %v", gotB, tt.wantB) + } } }) }