Add new test and fix code to make it work. Before, tests would sometimes

work in one direction, but not the other on interectsBounds.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1533 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-10-03 03:13:32 +00:00
parent 2cb4306beb
commit 642c438c2c
2 changed files with 11 additions and 6 deletions

View File

@@ -108,7 +108,7 @@
}
function test_08a_Bounds_intersectsBounds(t) {
t.plan( 16 );
t.plan( 17 );
var aBounds = new OpenLayers.Bounds(-180, -90, 180, 90);
@@ -118,6 +118,7 @@
t.eq( aBounds.intersectsBounds(bBounds), true, "(" + aBounds.toBBOX() + ") correctly intersects (" + bBounds.toBBOX() + ")" );
t.eq( aBounds.intersectsBounds(bBounds, true), true, "(" + aBounds.toBBOX() + ") correctly intersects (" + bBounds.toBBOX() + "), inclusive is true" );
t.eq( aBounds.intersectsBounds(bBounds, false), true, "(" + aBounds.toBBOX() + ") correctly intersects (" + bBounds.toBBOX() + "), inclusive is false" );
t.eq( aBounds.intersectsBounds(cBounds, false), true, "aBounds with cBounds adjusted one degree left passes intersect bounds. (3 sides match, 1 side different)." );
t.eq( cBounds.intersectsBounds(aBounds, false), true, "cBounds with aBounds adjusted one degree left passes intersect bounds. (3 sides match, 1 side different)." );
//outside