Skip to content

Commit 4ad4a85

Browse files
committed
Reducing verbosity
1 parent 377702c commit 4ad4a85

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

s1/earth_test.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ var degreesToMeters = []struct {
4747
{359.72807773387467 * Degree, 4e7 * unit.Meter},
4848
{360 * Degree, 40030236.42389422 * unit.Meter},
4949
{899.3201943346867 * Degree, 1e8 * unit.Meter},
50+
{1 * Radian, earth.Radius},
5051
}
5152

5253
func TestEarthAngleFromLength(t *testing.T) {
@@ -57,11 +58,6 @@ func TestEarthAngleFromLength(t *testing.T) {
5758
t.Errorf("EarthAngleFromLength(%v) = %v, want %v", test.length, got, want)
5859
}
5960
}
60-
61-
// Verify the fundamental identity: earth.Radius maps to exactly 1 radian.
62-
if got := EarthAngleFromLength(earth.Radius); got != 1*Radian {
63-
t.Errorf("EarthAngleFromLength(earth.Radius) = %v, want %v", got, 1*Radian)
64-
}
6561
}
6662

6763
func TestEarthLengthFromAngle(t *testing.T) {
@@ -72,11 +68,6 @@ func TestEarthLengthFromAngle(t *testing.T) {
7268
t.Errorf("EarthLengthFromAngle(%v) = %v, want %v", test.angle, got, want)
7369
}
7470
}
75-
76-
// Verify the fundamental identity: 1 radian maps to exactly earth.Radius.
77-
if got := EarthLengthFromAngle(1 * Radian); got != earth.Radius {
78-
t.Errorf("EarthLengthFromAngle(1*Radian) = %v, want %v", got, earth.Radius)
79-
}
8071
}
8172

8273
var (

0 commit comments

Comments
 (0)