Allow out-of-range signalling with undefined

This commit is contained in:
Tom Payne
2012-07-15 22:21:25 +02:00
parent e23e19c074
commit bf31b614e8
2 changed files with 22 additions and 7 deletions
+3
View File
@@ -6,6 +6,7 @@ goog.require('ol.TileUrlFunction');
function testCreateFromTemplate() {
var tileUrl = ol.TileUrlFunction.createFromTemplate('{z}/{x}/{y}');
assertEquals('3/2/1', tileUrl(new ol.TileCoord(3, 2, 1)));
assertUndefined(tileUrl(null));
}
@@ -16,6 +17,7 @@ function testWithTileCoordTransform() {
},
ol.TileUrlFunction.createFromTemplate('{z}/{x}/{y}'));
assertEquals('3/2/1', tileUrl(new ol.TileCoord(3, 2, -1)));
assertUndefined(tileUrl(null));
}
@@ -27,4 +29,5 @@ function testCreateFromTileUrlFunctions() {
var tileUrl1 = tileUrl(new ol.TileCoord(1, 0, 0));
var tileUrl2 = tileUrl(new ol.TileCoord(1, 0, 1));
assertTrue(tileUrl1 != tileUrl2);
assertUndefined(tileUrl(null));
}