@@ -59,20 +59,36 @@ def test_georadiusbymember_with_options_count_sort
5959 assert_equal [ [ "Palermo" , "166.2742" ] ] , city
6060 end
6161
62+ def coordinates_catania
63+ if version >= "8.0"
64+ [ "15.087267458438873" , "37.50266842333162" ]
65+ else
66+ [ "15.08726745843887329" , "37.50266842333162032" ]
67+ end
68+ end
69+
70+ def coordinates_palermo
71+ if version >= "8.0"
72+ [ "13.361389338970184" , "38.1155563954963" ]
73+ else
74+ [ "13.36138933897018433" , "38.11555639549629859" ]
75+ end
76+ end
77+
6278 def test_geopos
6379 location = r . geopos ( "Sicily" , "Catania" )
64- assert_equal [ [ "15.08726745843887329" , "37.50266842333162032" ] ] , location
80+ assert_equal [ coordinates_catania ] , location
6581
6682 locations = r . geopos ( "Sicily" , [ "Palermo" , "Catania" ] )
67- assert_equal [ [ "13.36138933897018433" , "38.11555639549629859" ] , [ "15.08726745843887329" , "37.50266842333162032" ] ] , locations
83+ assert_equal [ coordinates_palermo , coordinates_catania ] , locations
6884 end
6985
7086 def test_geopos_nonexistant_location
7187 location = r . geopos ( "Sicily" , "Rome" )
7288 assert_equal [ nil ] , location
7389
7490 locations = r . geopos ( "Sicily" , [ "Rome" , "Catania" ] )
75- assert_equal [ nil , [ "15.08726745843887329" , "37.50266842333162032" ] ] , locations
91+ assert_equal [ nil , coordinates_catania ] , locations
7692 end
7793
7894 def test_geodist
0 commit comments