From 228e5a8dbf6c5d4677114931c0d8961a17643896 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Wed, 26 Sep 2012 19:40:09 +0200 Subject: [PATCH] Move requires to end of the file to ensure tests run even if goog.require fails --- test/spec/ol/array.test.js | 4 ++-- test/spec/ol/collection.test.js | 8 ++++---- test/spec/ol/extent.test.js | 6 +++--- .../spec/ol/interaction/resolutionconstraint.test.js | 4 ++-- test/spec/ol/layer/xyz.test.js | 10 +++++----- test/spec/ol/object.test.js | 4 ++-- test/spec/ol/projection.test.js | 8 ++++---- test/spec/ol/rectangle.test.js | 6 +++--- test/spec/ol/tilecoord.test.js | 4 ++-- test/spec/ol/tilegrid.test.js | 12 ++++++------ test/spec/ol/tilerange.test.js | 4 ++-- test/spec/ol/tileurlfunction.test.js | 6 +++--- 12 files changed, 38 insertions(+), 38 deletions(-) diff --git a/test/spec/ol/array.test.js b/test/spec/ol/array.test.js index 850e040f1e..2decfb7ad8 100644 --- a/test/spec/ol/array.test.js +++ b/test/spec/ol/array.test.js @@ -1,5 +1,3 @@ -goog.require('ol.array'); - describe('ol.array', function() { describe('binaryFindNearest', function() { @@ -46,3 +44,5 @@ describe('ol.array', function() { }); }); }); + +goog.require('ol.array'); diff --git a/test/spec/ol/collection.test.js b/test/spec/ol/collection.test.js index 1743abb49e..3aae141893 100644 --- a/test/spec/ol/collection.test.js +++ b/test/spec/ol/collection.test.js @@ -1,7 +1,3 @@ -goog.require('goog.array'); -goog.require('ol.Collection'); -goog.require('ol.CollectionEventType'); - describe('ol.collection', function() { var collection; @@ -235,3 +231,7 @@ describe('ol.collection', function() { }); }); }); + +goog.require('goog.array'); +goog.require('ol.Collection'); +goog.require('ol.CollectionEventType'); diff --git a/test/spec/ol/extent.test.js b/test/spec/ol/extent.test.js index 562680bcea..8763aaf0d3 100644 --- a/test/spec/ol/extent.test.js +++ b/test/spec/ol/extent.test.js @@ -1,6 +1,3 @@ -goog.require('ol.Extent'); -goog.require('ol.Projection'); - describe('ol.Extent', function() { describe('contains', function() { @@ -60,3 +57,6 @@ describe('ol.Extent', function() { }); }); }); + +goog.require('ol.Extent'); +goog.require('ol.Projection'); diff --git a/test/spec/ol/interaction/resolutionconstraint.test.js b/test/spec/ol/interaction/resolutionconstraint.test.js index 1fcfef09d7..cb67277543 100644 --- a/test/spec/ol/interaction/resolutionconstraint.test.js +++ b/test/spec/ol/interaction/resolutionconstraint.test.js @@ -1,5 +1,3 @@ -goog.require('ol.interaction.ResolutionConstraint'); - describe('ol.interaction.ResolutionConstraint', function() { describe('SnapToResolution', function() { @@ -185,3 +183,5 @@ describe('ol.interaction.ResolutionConstraint', function() { }); }); }); + +goog.require('ol.interaction.ResolutionConstraint'); diff --git a/test/spec/ol/layer/xyz.test.js b/test/spec/ol/layer/xyz.test.js index 0dd3eb0e25..428871e918 100644 --- a/test/spec/ol/layer/xyz.test.js +++ b/test/spec/ol/layer/xyz.test.js @@ -1,8 +1,3 @@ -goog.require('ol.Coordinate'); -goog.require('ol.TileCoord'); -goog.require('ol.TileUrlFunction'); -goog.require('ol.tilestore.XYZ'); - describe('ol.tilestore.XYZ', function() { describe('getTileCoordUrl', function() { @@ -125,3 +120,8 @@ describe('ol.tilestore.XYZ', function() { }); }); + +goog.require('ol.Coordinate'); +goog.require('ol.TileCoord'); +goog.require('ol.TileUrlFunction'); +goog.require('ol.tilestore.XYZ'); diff --git a/test/spec/ol/object.test.js b/test/spec/ol/object.test.js index b591bc584f..e77f24bbf1 100644 --- a/test/spec/ol/object.test.js +++ b/test/spec/ol/object.test.js @@ -1,5 +1,3 @@ -goog.require('ol.Object'); - describe('ol.Object', function() { var o; @@ -367,3 +365,5 @@ describe('ol.Object', function() { }); }); }); + +goog.require('ol.Object'); diff --git a/test/spec/ol/projection.test.js b/test/spec/ol/projection.test.js index 4562236bbc..d88666a632 100644 --- a/test/spec/ol/projection.test.js +++ b/test/spec/ol/projection.test.js @@ -1,7 +1,3 @@ -goog.require('goog.array'); -goog.require('ol.Coordinate'); -goog.require('ol.Projection'); - describe('ol.Projection', function() { describe('projection equivalence', function() { @@ -101,3 +97,7 @@ describe('ol.Projection', function() { }); }); }); + +goog.require('goog.array'); +goog.require('ol.Coordinate'); +goog.require('ol.Projection'); diff --git a/test/spec/ol/rectangle.test.js b/test/spec/ol/rectangle.test.js index d1ca850897..e45cafdbd7 100644 --- a/test/spec/ol/rectangle.test.js +++ b/test/spec/ol/rectangle.test.js @@ -1,6 +1,3 @@ -goog.require('ol.Coordinate'); -goog.require('ol.Rectangle'); - describe('ol.Rectangle', function() { describe('getCenter', function() { @@ -100,3 +97,6 @@ describe('ol.Rectangle', function() { }); }); + +goog.require('ol.Coordinate'); +goog.require('ol.Rectangle'); diff --git a/test/spec/ol/tilecoord.test.js b/test/spec/ol/tilecoord.test.js index 10ab897285..9ef3bd623a 100644 --- a/test/spec/ol/tilecoord.test.js +++ b/test/spec/ol/tilecoord.test.js @@ -1,5 +1,3 @@ -goog.require('ol.TileCoord'); - describe('ol.TileCoord', function() { describe('create', function() { @@ -46,3 +44,5 @@ describe('ol.TileCoord', function() { }); }); }); + +goog.require('ol.TileCoord'); diff --git a/test/spec/ol/tilegrid.test.js b/test/spec/ol/tilegrid.test.js index a4a86f11fa..092bd39be8 100644 --- a/test/spec/ol/tilegrid.test.js +++ b/test/spec/ol/tilegrid.test.js @@ -1,9 +1,3 @@ -goog.require('ol.Coordinate'); -goog.require('ol.Extent'); -goog.require('ol.Size'); -goog.require('ol.TileCoord'); -goog.require('ol.TileGrid'); - describe('ol.TileGrid', function() { var extent; var resolutions; @@ -466,3 +460,9 @@ describe('ol.TileGrid', function() { }); }); + +goog.require('ol.Coordinate'); +goog.require('ol.Extent'); +goog.require('ol.Size'); +goog.require('ol.TileCoord'); +goog.require('ol.TileGrid'); diff --git a/test/spec/ol/tilerange.test.js b/test/spec/ol/tilerange.test.js index 630308e9e7..33ea5265eb 100644 --- a/test/spec/ol/tilerange.test.js +++ b/test/spec/ol/tilerange.test.js @@ -1,5 +1,3 @@ -goog.require('ol.TileRange'); - describe('ol.TileRange', function() { describe('contains', function() { @@ -92,3 +90,5 @@ describe('ol.TileRange', function() { }); }); + +goog.require('ol.TileRange'); diff --git a/test/spec/ol/tileurlfunction.test.js b/test/spec/ol/tileurlfunction.test.js index edafbf02da..445c2e4daa 100644 --- a/test/spec/ol/tileurlfunction.test.js +++ b/test/spec/ol/tileurlfunction.test.js @@ -1,6 +1,3 @@ -goog.require('ol.TileCoord'); -goog.require('ol.TileUrlFunction'); - describe('ol.TileUrlFunction', function() { describe('createFromTemplate', function() { @@ -36,3 +33,6 @@ describe('ol.TileUrlFunction', function() { }); }); }); + +goog.require('ol.TileCoord'); +goog.require('ol.TileUrlFunction');