Browse Source

Update .travis.yml to include testing on go version 1.14.x

+ Also, go fmt ./..
Abhinav Dangeti 2 years ago
parent
commit
314af13184
5 changed files with 7 additions and 6 deletions
  1. 1 0
      .travis.yml
  2. 1 1
      geo/geo.go
  3. 1 1
      geo/geo_dist_test.go
  4. 2 2
      geo/geo_test.go
  5. 2 2
      geo/sloppy_test.go

+ 1 - 0
.travis.yml

@@ -5,6 +5,7 @@ language: go
 go:
  - "1.12.x"
  - "1.13.x"
+ - "1.14.x"
 
 script:
   - go get golang.org/x/tools/cmd/cover

+ 1 - 1
geo/geo.go

@@ -33,7 +33,7 @@ var minLonRad = minLon * degreesToRadian
 var minLatRad = minLat * degreesToRadian
 var maxLonRad = maxLon * degreesToRadian
 var maxLatRad = maxLat * degreesToRadian
-var geoTolerance = 1E-6
+var geoTolerance = 1e-6
 var lonScale = float64((uint64(0x1)<<GeoBits)-1) / 360.0
 var latScale = float64((uint64(0x1)<<GeoBits)-1) / 180.0
 

+ 1 - 1
geo/geo_dist_test.go

@@ -113,7 +113,7 @@ func TestHaversinDistance(t *testing.T) {
 		if math.IsNaN(test.want) && !math.IsNaN(got) {
 			t.Errorf("expected NaN, got %f", got)
 		}
-		if !math.IsNaN(test.want) && math.Abs(got-test.want) > 1E-2 {
+		if !math.IsNaN(test.want) && math.Abs(got-test.want) > 1e-2 {
 			t.Errorf("expected %f got %f", test.want, got)
 		}
 	}

+ 2 - 2
geo/geo_test.go

@@ -89,10 +89,10 @@ func TestRectFromPointDistance(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	if math.Abs(upperLeftLat-1) > 1E-2 {
+	if math.Abs(upperLeftLat-1) > 1e-2 {
 		t.Errorf("expected bounding box upper left lat to be almost 1, got %f", upperLeftLat)
 	}
-	if math.Abs(lowerRightLat+1) > 1E-2 {
+	if math.Abs(lowerRightLat+1) > 1e-2 {
 		t.Errorf("expected bounding box lower right lat to be almost -1, got %f", lowerRightLat)
 	}
 }

+ 2 - 2
geo/sloppy_test.go

@@ -21,7 +21,7 @@ import (
 
 func TestCos(t *testing.T) {
 
-	cosDelta := 1E-15
+	cosDelta := 1e-15
 
 	tests := []struct {
 		in   float64
@@ -55,7 +55,7 @@ func TestCos(t *testing.T) {
 
 func TestAsin(t *testing.T) {
 
-	asinDelta := 1E-7
+	asinDelta := 1e-7
 
 	tests := []struct {
 		in   float64