Skip to content

Commit

Permalink
Merge pull request #53 from showwin/add/distance_test
Browse files Browse the repository at this point in the history
add more test
  • Loading branch information
showwin authored Jul 19, 2021
2 parents 0bec4d7 + ea0fdd8 commit bc0d679
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions speedtest/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func TestDistance(t *testing.T) {
if d1 != d2 {
t.Errorf("%v and %v should be save value", d1, d2)
}

d = distance(35.0, 140.0, -40.0, -140.0)
if d < 11000 || 12000 < d {
t.Errorf("got: %v, expected 0", d)
}
}

func TestFindServer(t *testing.T) {
Expand Down

0 comments on commit bc0d679

Please sign in to comment.