From 002eb40bfb86662b51eb20d2b794574ba793f25c Mon Sep 17 00:00:00 2001 From: mpl Date: Wed, 9 Nov 2016 17:24:26 +0100 Subject: [PATCH] pkg/search: fix float VS int bug in BenchmarkLocationPredicate Change-Id: I2e4457d3b32f1e5b1c5adf63c1b5068fac603cc3 --- pkg/search/query_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/search/query_test.go b/pkg/search/query_test.go index 043d85b05..67a8ced6a 100644 --- a/pkg/search/query_test.go +++ b/pkg/search/query_test.go @@ -1602,8 +1602,8 @@ func BenchmarkLocationPredicate(b *testing.B) { // create (~700) venues all over the world, and mark 25% of them as places we've been to venueIdx := 0 - for long := -180; long < 180; long += 10 { - for lat := -90; lat < 90; lat += 10 { + for long := -180.; long < 180.; long += 10. { + for lat := -90.; lat < 90.; lat += 10. { pn := newPn() id.SetAttribute(pn, "camliNodeType", "foursquare.com:venue") id.SetAttribute(pn, "latitude", fmt.Sprintf("%f", lat)) @@ -1646,10 +1646,6 @@ func BenchmarkLocationPredicate(b *testing.B) { h := qt.Handler() b.ResetTimer() - // TODO(mpl): investigate whether it's normal that we don't find - // any permanodes in e.g. Canada (no tweets is expected, but no 4sq - // seems indeed a bit odd). - locations := []string{ "canada", "scotland", "france", "sweden", "germany", "poland", "russia", "algeria", "congo", "china", "india", "australia", "mexico", "brazil", "argentina", }