golang / geo

S2 geometry library in Go
Apache License 2.0
1.69k stars 182 forks source link

stuv_test.go: dead test code #21

Closed yjh0502 closed 7 years ago

yjh0502 commented 7 years ago

There's dead test code on stuv_test.go [1]

siRandom and tiRandom is initialized to zero, siRandom > maxSiTi || tiRandom > maxSiTi is always false, therefore siRandom and tiRandom will be always zero for the testcase.

Here's simple fix.

siRandom = uint64(maxSiTi)
tiRansom = uint64(maxSiTi)

https://github.com/golang/geo/blob/d6335c766376e743cb50b2c92e981e3219f405d7/s2/stuv_test.go#L273-L278

dsymonds commented 7 years ago

@rsned, can you take a look and fix internally if needed?

rsned commented 7 years ago

Will do.

On Wed, Apr 26, 2017 at 3:54 PM, David Symonds notifications@github.com wrote:

@rsned https://github.com/rsned, can you take a look and fix internally if needed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/golang/geo/issues/21#issuecomment-297564185, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJzBA7Wh-DwrRDIwzgQetdU67PjThlSks5rz8sVgaJpZM4NJDO2 .