Adds function tests for polygons

This commit is contained in:
Carla
2015-07-15 17:13:30 +02:00
parent 7153eaca36
commit fcc7f79b33

View File

@@ -8,7 +8,7 @@ function test_geocoding_functions_zipcodes_usa() {
sql "SELECT (admin0_available_services(Array['USA'])).postal_code_points" should true
#Checks that zipcode points are available
sql "SELECT (admin0_available_services(Array['USA'])).postal_code_polygons" should true
sql "SELECT ST_GeometryType((geocode_postalcode_polygons(Array['11211'], 'USA')).geom)" should ST_MultiPolygon
}
function test_geocoding_functions_zipcodes_fra() {
@@ -16,6 +16,8 @@ function test_geocoding_functions_zipcodes_fra() {
sql "SELECT (admin0_available_services(Array['FRA'])).postal_code_points" should true
#Checks that zipcode points are available
sql "SELECT (admin0_available_services(Array['FRA'])).postal_code_polygons" should true
sql "SELECT ST_GeometryType(((geocode_postalcode_polygons(Array['23270'], Array['FRA'])).geom))" should ST_MultiPolygon
}
function test_geocoding_functions_zipcodes_can() {
@@ -23,6 +25,8 @@ function test_geocoding_functions_zipcodes_can() {
sql "SELECT (admin0_available_services(Array['CAN'])).postal_code_points" should true
#Checks that zipcode points are available
sql "SELECT (admin0_available_services(Array['CAN'])).postal_code_polygons" should true
sql "SELECT ST_GeometryType((geocode_postalcode_polygons(Array['A0J'], 'CAN')).geom)" should ST_MultiPolygon
}
function test_geocoding_functions_zipcodes_aus() {
@@ -30,6 +34,8 @@ function test_geocoding_functions_zipcodes_aus() {
sql "SELECT (admin0_available_services(Array['AUS'])).postal_code_points" should true
#Checks that zipcode points are available
sql "SELECT (admin0_available_services(Array['AUS'])).postal_code_polygons" should true
sql "SELECT ST_GeometryType((geocode_postalcode_polygons(Array['3012'], 'AUS')).geom)" should ST_MultiPolygon
}