fix up tests, remove _01_. (Closes #1387)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6724 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2008-03-31 05:31:28 +00:00
parent 0d6174db7f
commit 3e348f450e
65 changed files with 373 additions and 373 deletions

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var bounds;
function test_01_Bounds_constructor (t) {
function test_Bounds_constructor (t) {
t.plan( 17 );
bounds = new OpenLayers.Bounds();
@@ -38,7 +38,7 @@
t.ok( boundsCenter.equals(center), "bounds.getCenterLonLat() has correct value" );
}
function test_01a_Bounds_constructorFromStrings(t) {
function test_Bounds_constructorFromStrings(t) {
t.plan( 6 );
bounds = new OpenLayers.Bounds("0","2","10","4");
t.ok( bounds instanceof OpenLayers.Bounds, "new OpenLayers.Bounds returns Bounds object" );
@@ -50,7 +50,7 @@
}
function test_02_Bounds_toBBOX(t) {
function test_Bounds_toBBOX(t) {
t.plan( 5 );
bounds = new OpenLayers.Bounds(1,2,3,4);
t.eq( bounds.toBBOX(), "1,2,3,4", "toBBOX() returns correct value." );
@@ -65,7 +65,7 @@
bounds = new OpenLayers.Bounds(1,2.5555555,3,4);
}
function test_03_Bounds_toString(t) {
function test_Bounds_toString(t) {
t.plan( 1 );
bounds = new OpenLayers.Bounds(1,2,3,4);
t.eq( bounds.toString(), "left-bottom=(1,2) right-top=(3,4)", "toString() returns correct value." );
@@ -101,7 +101,7 @@
"bounds bottom preserved");
}
function test_04_Bounds_contains(t) {
function test_Bounds_contains(t) {
t.plan( 6 );
bounds = new OpenLayers.Bounds(10,10,40,40);
t.eq( bounds.contains(20,20), true, "bounds(10,10,40,40) correctly contains LonLat(20,20)" );
@@ -117,7 +117,7 @@
}
function test_05_Bounds_fromString(t) {
function test_Bounds_fromString(t) {
t.plan( 10 );
bounds = OpenLayers.Bounds.fromString("1,2,3,4");
t.ok( bounds instanceof OpenLayers.Bounds, "new OpenLayers.Bounds returns Bounds object" );
@@ -135,14 +135,14 @@
}
function test_06_Bounds_getSize(t) {
function test_Bounds_getSize(t) {
t.plan( 1 );
var bounds = new OpenLayers.Bounds(0,10,100,120);
t.ok( bounds.getSize().equals(new OpenLayers.Size(100, 110)), "getCenterPixel() works correctly");
}
function test_07_Bounds_clone(t) {
function test_Bounds_clone(t) {
t.plan( 6 );
var oldBounds = new OpenLayers.Bounds(1,2,3,4);
var bounds = oldBounds.clone();
@@ -156,7 +156,7 @@
t.eq( bounds.left, 1, "changing olBounds.left does not change bounds.left" );
}
function test_08a_Bounds_intersectsBounds(t) {
function test_Bounds_intersectsBounds(t) {
t.plan( 17 );
var aBounds = new OpenLayers.Bounds(-180, -90, 180, 90);
@@ -196,7 +196,7 @@
}
function test_08b_Bounds_containsBounds(t) {
function test_Bounds_containsBounds(t) {
t.plan( 35 );
containerBounds = new OpenLayers.Bounds(10,10,40,40);
@@ -251,7 +251,7 @@
t.eq( containerBounds.containsBounds(bounds, true, false) , true, "(" + containerBounds.toBBOX() + ") correctly contains (" + bounds.toBBOX() + ") when partial is true, inclusive is false" );
}
function test_09_Bounds_determineQuadrant(t) {
function test_Bounds_determineQuadrant(t) {
t.plan( 4 );
var bounds = new OpenLayers.Bounds(0,0,100,100);
@@ -267,7 +267,7 @@
t.eq( bounds.determineQuadrant(br), "br", "bounds.determineQuadrant correctly identifies a coordinate in the bottom right quadrant");
}
function test_10_Bounds_oppositeQuadrant(t) {
function test_Bounds_oppositeQuadrant(t) {
t.plan( 4 );
@@ -277,7 +277,7 @@
t.eq( OpenLayers.Bounds.oppositeQuadrant("br"), "tl", "OpenLayers.Bounds.oppositeQuadrant returns 'tl' for 'br'");
}
function test_11_Bounds_equals(t) {
function test_Bounds_equals(t) {
t.plan( 3 );
var boundsA = new OpenLayers.Bounds(1,2,3,4);
var boundsB = new OpenLayers.Bounds(1,2,3,4);
@@ -288,7 +288,7 @@
t.ok( !boundsA.equals(null), "equals() returns false on comparison to null");
}
function test_12_Bounds_getHeight_getWidth(t) {
function test_Bounds_getHeight_getWidth(t) {
t.plan( 2 );
var bounds = new OpenLayers.Bounds(10,20,100,120);
@@ -297,7 +297,7 @@
}
function test_13_Bounds_getCenters(t) {
function test_Bounds_getCenters(t) {
t.plan( 2 );
var bounds = new OpenLayers.Bounds(0,20,100,120);
@@ -305,7 +305,7 @@
t.ok( bounds.getCenterLonLat().equals(new OpenLayers.LonLat(50, 70)), "getCenterLonLat() works correctly");
}
function test_14_Bounds_fromArray(t) {
function test_Bounds_fromArray(t) {
t.plan( 5 );
var bbox = [1,2,3,4];
@@ -317,7 +317,7 @@
t.eq( bounds.top, 4, "bounds.top is set correctly" );
}
function test_15_Bounds_fromSize(t) {
function test_Bounds_fromSize(t) {
t.plan( 5 );
var height = 15;
@@ -332,7 +332,7 @@
}
function test_16_Bounds_extend(t) {
function test_Bounds_extend(t) {
t.plan( 9 );
var originalBounds = new OpenLayers.Bounds();
@@ -429,7 +429,7 @@
}
function test_16_Bounds_wrapDateLine(t) {
function test_Bounds_wrapDateLine(t) {
t.plan( 13 );
var testBounds, wrappedBounds, desiredBounds;
@@ -530,7 +530,7 @@
t.eq(bounds.toBBOX(), "10,-10,20,10", "bounds for inverse spherical mercator transform are correct");
}
function test_17_Bounds_add(t) {
function test_Bounds_add(t) {
t.plan( 8 );
origBounds = new OpenLayers.Bounds(1,2,3,4);

View File

@@ -167,7 +167,7 @@
}
// Remove this at 3.0
function test_01_Class_create (t) {
function test_Class_create (t) {
t.plan( 3 );
var cls = OpenLayers.Class.create();
cls.prototype = {
@@ -189,7 +189,7 @@
}
// Remove this at 3.0
function test_02_Class_inherit (t) {
function test_Class_inherit (t) {
t.plan( 20 );
var A = OpenLayers.Class.create();
var initA = 0;

View File

@@ -5,7 +5,7 @@
<script type="text/javascript">
function test_01_Element_visible(t) {
function test_Element_visible(t) {
t.plan(3);
var elem = {
@@ -24,7 +24,7 @@
t.ok(!OpenLayers.Element.visible(elem), "element with style.display == none is not visible");
}
function test_02_Element_toggle(t) {
function test_Element_toggle(t) {
t.plan(2);
var elem1 = {
@@ -45,7 +45,7 @@
t.eq(elem2.style.display, "none", "shown element toggled to hidden");
}
function test_03_Element_hide(t) {
function test_Element_hide(t) {
t.plan(2);
var elem1 = {
@@ -66,7 +66,7 @@
t.eq(elem2.style.display, "none", "shown element hidden");
}
function test_04_Element_show(t) {
function test_Element_show(t) {
t.plan(2);
var elem1 = {
@@ -87,7 +87,7 @@
t.eq(elem2.style.display, "", "shown element stays shown");
}
function test_05_Element_remove(t) {
function test_Element_remove(t) {
t.plan(1);
var elem = {
@@ -100,7 +100,7 @@
OpenLayers.Element.remove(elem);
}
function test_06_Element_getHeight(t) {
function test_Element_getHeight(t) {
t.plan(1);
var elem = {
@@ -110,7 +110,7 @@
t.ok(OpenLayers.Element.getHeight(elem) == elem.offsetHeight, "offsetHeight returned");
}
function test_07_Element_getDimensions(t) {
function test_Element_getDimensions(t) {
t.plan(4);
//shown
@@ -136,7 +136,7 @@
}
function test_08_Element_getStyle(t) {
function test_Element_getStyle(t) {
t.plan(4);
//tests for this function are not 100% complete... there is some funky

View File

@@ -5,7 +5,7 @@
var lonlat;
function test_01_LonLat_constructor (t) {
function test_LonLat_constructor (t) {
t.plan( 4 );
lonlat = new OpenLayers.LonLat(6, 5);
t.ok( lonlat instanceof OpenLayers.LonLat, "new OpenLayers.LonLat returns LonLat object" );
@@ -14,7 +14,7 @@
t.eq( lonlat.lat, 5, "lonlat.lat is set correctly");
}
function test_01a_LonLat_constructorFromStrings (t) {
function test_LonLat_constructorFromStrings (t) {
t.plan( 4 );
lonlat = new OpenLayers.LonLat("6", "5");
t.ok( lonlat instanceof OpenLayers.LonLat, "new OpenLayers.LonLat returns LonLat object" );
@@ -23,19 +23,19 @@
t.eq( lonlat.lat, 5, "lonlat.lat is set correctly");
}
function test_02_LonLat_toString(t) {
function test_LonLat_toString(t) {
t.plan( 1 );
lonlat = new OpenLayers.LonLat(5,6);
t.eq( lonlat.toString(), "lon=5,lat=6", "lonlat.toString() returns correctly");
}
function test_02A_LonLat_toShortString(t) {
function test_LonLat_toShortString(t) {
t.plan( 1 );
lonlat = new OpenLayers.LonLat(5,6);
t.eq( lonlat.toShortString(), "5, 6", "lonlat.toShortString() returns correctly");
}
function test_03_LonLat_clone(t) {
function test_LonLat_clone(t) {
t.plan( 3 );
oldLonLat = new OpenLayers.LonLat(5,6);
lonlat = oldLonLat.clone();
@@ -46,7 +46,7 @@
t.eq( lonlat.lon, 5, "changing oldLonLat.lon doesn't change lonlat.lon");
}
function test_04_LonLat_add(t) {
function test_LonLat_add(t) {
t.plan( 8 );
origLL = new OpenLayers.LonLat(10,100);
@@ -73,7 +73,7 @@
t.ok(addpx == null, "returns null on erroneous add operation (null lat)");
}
function test_06_LonLat_equals(t) {
function test_LonLat_equals(t) {
t.plan( 5 );
lonlat = new OpenLayers.LonLat(5,6);
@@ -93,7 +93,7 @@
}
function test_07_LonLat_fromString(t) {
function test_LonLat_fromString(t) {
t.plan( 2 );
lonlat = OpenLayers.LonLat.fromString("6,5");
t.ok( lonlat instanceof OpenLayers.LonLat, "new OpenLayers.LonLat returns LonLat object" );
@@ -116,7 +116,7 @@
t.eq(Math.round(lonlat.lat), -10, "lat for inverse spherical mercator correct")
}
function test_08_LonLat_wrapDateLine(t) {
function test_LonLat_wrapDateLine(t) {
t.plan( 6 );
var goodLL = new OpenLayers.LonLat(0,0);

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var pixel;
function test_01_Pixel_constructor (t) {
function test_Pixel_constructor (t) {
t.plan( 4 );
pixel = new OpenLayers.Pixel(5,6);
t.ok( pixel instanceof OpenLayers.Pixel, "new OpenLayers.Pixel returns Pixel object" );
@@ -13,7 +13,7 @@
t.eq( pixel.y, 6, "pixel.y is set correctly");
}
function test_01a_Pixel_constructorFromString (t) {
function test_Pixel_constructorFromString (t) {
t.plan( 4 );
pixel = new OpenLayers.Pixel("5","6");
t.ok( pixel instanceof OpenLayers.Pixel, "new OpenLayers.Pixel returns Pixel object" );
@@ -22,13 +22,13 @@
t.eq( pixel.y, 6, "pixel.y is set correctly");
}
function test_02_Pixel_toString(t) {
function test_Pixel_toString(t) {
t.plan( 1 );
pixel = new OpenLayers.Pixel(5,6);
t.eq( pixel.toString(), "x=5,y=6", "pixel.toString() returns correctly");
}
function test_03_Pixel_clone(t) {
function test_Pixel_clone(t) {
t.plan( 4 );
oldPixel = new OpenLayers.Pixel(5,6);
pixel = oldPixel.clone();
@@ -40,7 +40,7 @@
t.eq( pixel.x, 5, "changing oldPixel.x doesn't change pixel.x");
}
function test_06_Pixel_equals(t) {
function test_Pixel_equals(t) {
t.plan( 5 );
pixel = new OpenLayers.Pixel(5,6);
@@ -60,7 +60,7 @@
}
function test_07_Pixel_add(t) {
function test_Pixel_add(t) {
t.plan( 8 );
var origPX = new OpenLayers.Pixel(5,6);
@@ -88,7 +88,7 @@
t.ok(pixel == null, "returns null on erroneous add operation (null y)");
}
function test_08_Pixel_offset(t) {
function test_Pixel_offset(t) {
t.plan( 4 );
var oldPixel = new OpenLayers.Pixel(5,6);

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var Size;
function test_01_Size_constructor (t) {
function test_Size_constructor (t) {
t.plan( 4 );
size = new OpenLayers.Size(5,6);
t.ok( size instanceof OpenLayers.Size, "new OpenLayers.Size returns size object" );
@@ -13,7 +13,7 @@
t.eq( size.h, 6, "size.h is set correctly");
}
function test_01a_Size_constructorFromString (t) {
function test_Size_constructorFromString (t) {
t.plan( 4 );
size = new OpenLayers.Size("5","6");
t.ok( size instanceof OpenLayers.Size, "new OpenLayers.Size returns size object" );
@@ -22,13 +22,13 @@
t.eq( size.h, 6, "size.h is set correctly");
}
function test_02_Size_toString(t) {
function test_Size_toString(t) {
t.plan( 1 );
size = new OpenLayers.Size(5,6);
t.eq( size.toString(), "w=5,h=6", "size.toString() returns correctly");
}
function test_03_Size_clone(t) {
function test_Size_clone(t) {
t.plan( 3 );
oldSize = new OpenLayers.Size(5,6);
@@ -40,7 +40,7 @@
t.eq( size.w, 5, "changing oldSize.w doesn't change size.w");
}
function test_04_Size_equals(t) {
function test_Size_equals(t) {
t.plan( 5 );
size = new OpenLayers.Size(5,6);