modify all equals() functions in Util.js (Size, Pixel, LonLat, Bounds) such that if a null value is passed in, they return false. Tests updated to make sure this is true.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@608 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -171,13 +171,14 @@
|
||||
}
|
||||
|
||||
function test_11_Bounds_equals(t) {
|
||||
t.plan( 2 );
|
||||
t.plan( 3 );
|
||||
var boundsA = new OpenLayers.Bounds(1,2,3,4);
|
||||
var boundsB = new OpenLayers.Bounds(1,2,3,4);
|
||||
var boundsC = new OpenLayers.Bounds(1,5,3,4);
|
||||
|
||||
t.ok( boundsA.equals(boundsB), "equals() returns true on two equal bounds." );
|
||||
t.ok( !boundsA.equals(boundsC), "equals() returns false on two different bounds." );
|
||||
t.ok( !boundsA.equals(null), "equals() returns false on comparison to null");
|
||||
}
|
||||
|
||||
function test_12_Bounds_getHeight_getWidth(t) {
|
||||
|
||||
Reference in New Issue
Block a user