tests/Bounds: Fixed indentation and whitespace

This commit is contained in:
Tobias Bieniek
2013-03-23 11:33:17 +01:00
parent 03735b74ab
commit d65f604b25
+16 -15
View File
@@ -444,37 +444,36 @@
function test_Bounds_extend(t) { function test_Bounds_extend(t) {
t.plan( 9 ); t.plan( 9 );
// null bounds to start
var originalBounds = new OpenLayers.Bounds(); var originalBounds = new OpenLayers.Bounds();
var bounds = originalBounds.clone(); var bounds = originalBounds.clone();
//null bounds to start
bounds.extend(new OpenLayers.LonLat(4,5)); bounds.extend(new OpenLayers.LonLat(4,5));
t.ok(bounds.equals(new OpenLayers.Bounds(4,5,4,5)), "uninitialized bounds can be safely extended"); t.ok(bounds.equals(new OpenLayers.Bounds(4,5,4,5)), "uninitialized bounds can be safely extended");
// extend with null obj
originalBounds = new OpenLayers.Bounds(10,20,50,80); originalBounds = new OpenLayers.Bounds(10,20,50,80);
bounds = originalBounds.clone(); bounds = originalBounds.clone();
//null obj
bounds.extend(null); bounds.extend(null);
t.ok(bounds.equals(originalBounds), "null to extend does not crash or change original bounds"); t.ok(bounds.equals(originalBounds), "null to extend does not crash or change original bounds");
//obj with no classname // obj with no classname
var object = {}; var object = {};
bounds.extend(object); bounds.extend(object);
t.ok(bounds.equals(originalBounds), "extend() passing object with no classname does not crash or change original bounds") t.ok(bounds.equals(originalBounds), "extend() passing object with no classname does not crash or change original bounds")
//obj is bounds
//pushing all limits with bounds obj // obj is bounds
// pushing all limits with bounds obj
var testBounds = new OpenLayers.Bounds(5, 10, 60, 90); var testBounds = new OpenLayers.Bounds(5, 10, 60, 90);
object = testBounds.clone(); object = testBounds.clone();
bounds.extend(object); bounds.extend(object);
t.ok(bounds.equals(testBounds), "extend by valid bounds, pushing all limits, correctly extends bounds"); t.ok(bounds.equals(testBounds), "extend by valid bounds, pushing all limits, correctly extends bounds");
//pushing no limits with bounds obj // pushing no limits with bounds obj
bounds = originalBounds.clone(); bounds = originalBounds.clone();
testBounds = new OpenLayers.Bounds(15, 30, 40, 70); testBounds = new OpenLayers.Bounds(15, 30, 40, 70);
@@ -483,9 +482,10 @@
bounds.extend(object); bounds.extend(object);
t.ok(bounds.equals(originalBounds), "extend by valid bounds, pushing no limits, correctly does not extend bounds"); t.ok(bounds.equals(originalBounds), "extend by valid bounds, pushing no limits, correctly does not extend bounds");
// obj is lonlat
//left, bottom // obj is lonlat
// left, bottom
bounds = originalBounds.clone(); bounds = originalBounds.clone();
object = new OpenLayers.LonLat(5, 10); object = new OpenLayers.LonLat(5, 10);
@@ -497,7 +497,7 @@
(bounds.right == originalBounds.right) && (bounds.right == originalBounds.right) &&
(bounds.top == originalBounds.top)), "obj lonlat to extends correctly modifies left and bottom"); (bounds.top == originalBounds.top)), "obj lonlat to extends correctly modifies left and bottom");
//right, top // right, top
bounds = originalBounds.clone(); bounds = originalBounds.clone();
object = new OpenLayers.LonLat(60,90); object = new OpenLayers.LonLat(60,90);
@@ -509,9 +509,10 @@
(bounds.right == object.lon) && (bounds.right == object.lon) &&
(bounds.top == object.lat)), "obj lonlat to extends correctly modifies right and top"); (bounds.top == object.lat)), "obj lonlat to extends correctly modifies right and top");
// obj is point
//left, bottom // obj is point
// left, bottom
bounds = originalBounds.clone(); bounds = originalBounds.clone();
object = new OpenLayers.Geometry.Point(5, 10); object = new OpenLayers.Geometry.Point(5, 10);
@@ -523,7 +524,7 @@
(bounds.right == originalBounds.right) && (bounds.right == originalBounds.right) &&
(bounds.top == originalBounds.top)), "obj Point to extends correctly modifies left and bottom"); (bounds.top == originalBounds.top)), "obj Point to extends correctly modifies left and bottom");
//right, top // right, top
bounds = originalBounds.clone(); bounds = originalBounds.clone();
object = new OpenLayers.Geometry.Point(60,90); object = new OpenLayers.Geometry.Point(60,90);