func TestFromLatLonBadInput(t *testing.T) { for i, data := range badInputLatLon { _, err := data.FromLatLon() if err == nil { t.Errorf("Expected error. badInputLatLon TestFromLatLonBadInput case %d", i) } } latLon := UTM.LatLon{} latLon.Longitude = 0 for i := -8000.0; i < 8401.0; i++ { latLon.Latitude = i / 100 _, err := latLon.FromLatLon() if err != nil { t.Errorf("not cover Latitude %d", i/100) } } latLon.Latitude = 0 for i := -18000.0; i < 18001.0; i++ { latLon.Longitude = i / 100 _, err := latLon.FromLatLon() if err != nil { t.Errorf("not cover Longitude %d", i/100) } } }