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

@@ -4,7 +4,7 @@
<script type="text/javascript">
var coll;
function test_01_Collection_constructor (t) {
function test_Collection_constructor (t) {
t.plan( 4 );
//null param
@@ -28,7 +28,7 @@
OpenLayers.Geometry.Collection.prototype._addComponents;
}
function test_02_Collection_addComponents (t) {
function test_Collection_addComponents (t) {
t.plan( 10 );
coll = new OpenLayers.Geometry.Collection();
@@ -76,7 +76,7 @@
t.eq( bounds.top, 10, "top bound is 10" );
}
function test_03_Collection_clone (t) {
function test_Collection_clone (t) {
t.plan( 3 );
coll = new OpenLayers.Geometry.Collection();
coll.addComponents(new OpenLayers.Geometry.Point(0,0));
@@ -88,7 +88,7 @@
"coll2.components.length is set correctly");
}
function test_04_Collection_removeComponents (t) {
function test_Collection_removeComponents (t) {
t.plan( 5 );
coll = new OpenLayers.Geometry.Collection();
point = new OpenLayers.Geometry.Point(0,0);
@@ -113,7 +113,7 @@
}
function test_06_Collection_calculateBounds(t) {
function test_Collection_calculateBounds(t) {
t.plan( 9 );
var coll = new OpenLayers.Geometry.Collection();
@@ -149,7 +149,7 @@
t.ok(!geom.equals(), "collection.equals() returns false for undefined");
}
function test_07_Collection_addComponent(t) {
function test_Collection_addComponent(t) {
t.plan(10);
var coll = new OpenLayers.Geometry.Collection();
@@ -196,7 +196,7 @@
}
function test_08_collection_getLength(t) {
function test_collection_getLength(t) {
t.plan(2);
//null
@@ -211,7 +211,7 @@
t.eq( coll.getLength(), 65, "coll with valid components correctly sums getlength");
}
function test_09_collection_getArea(t) {
function test_collection_getArea(t) {
t.plan(2);
//null
@@ -226,7 +226,7 @@
t.eq( coll.getArea(), 65, "coll with valid components correctly sums getArea");
}
function test_99_Collection_destroy(t) {
function test_Collection_destroy(t) {
t.plan( 1 );
coll = new OpenLayers.Geometry.Collection();
coll.components = {};

View File

@@ -6,7 +6,7 @@
var components = [new OpenLayers.Geometry.Point(10,10),
new OpenLayers.Geometry.Point(0,0)];
function test_01_Curve_constructor (t) {
function test_Curve_constructor (t) {
t.plan( 3 );
curve = new OpenLayers.Geometry.Curve();
t.ok( curve instanceof OpenLayers.Geometry.Curve, "new OpenLayers.Geometry.Curve returns curve object" );
@@ -14,14 +14,14 @@
t.eq( curve.components, [], "curve.components is set correctly");
}
function test_01a_Curve_constructor (t) {
function test_Curve_constructor (t) {
t.plan( 2 );
curve = new OpenLayers.Geometry.Curve(components);
t.ok( curve instanceof OpenLayers.Geometry.Curve, "new OpenLayers.Geometry.Curve returns curve object" );
t.eq( curve.components.length, 2, "curve.components.length is set correctly");
}
function test_02_Curve_clone (t) {
function test_Curve_clone (t) {
t.plan( 2 );
curve = new OpenLayers.Geometry.Curve(components);
curve2 = curve.clone();
@@ -29,7 +29,7 @@
t.eq( curve2.components.length, 2, "curve2.components.length is set correctly");
}
function test_03_Curve_calculateBounds(t) {
function test_Curve_calculateBounds(t) {
t.plan( 17 );
@@ -83,7 +83,7 @@
}
function test_04_Curve_addComponent (t) {
function test_Curve_addComponent (t) {
t.plan( 8 );
curve = new OpenLayers.Geometry.Curve(components);
curve.addComponent(new OpenLayers.Geometry.Point(20,30));
@@ -100,7 +100,7 @@
t.eq( curve.components[1].y, -30, "new point.lat is -30 (index worked)" );
}
function test_05_Curve_removeComponent (t) {
function test_Curve_removeComponent (t) {
t.plan( 4 );
curve = new OpenLayers.Geometry.Curve(components);
curve.removeComponent(curve.components[1]);
@@ -111,7 +111,7 @@
t.eq( bounds.bottom, 10, "bottom bound is 10 after removeComponent" );
}
function test_06_Curve_getLength (t) {
function test_Curve_getLength (t) {
t.plan( 4 );
//no components
@@ -138,7 +138,7 @@
t.eq(curve.getLength(), 50, "curve.getLength returns a reasonably accurate length" );
}
function test_07_Curve_destroy(t) {
function test_Curve_destroy(t) {
t.plan(1);
var curve = new OpenLayers.Geometry.Curve();

View File

@@ -6,7 +6,7 @@
var components = [new OpenLayers.Geometry.Point(10,15),
new OpenLayers.Geometry.Point(0,0)];
function test_01_LineString_constructor (t) {
function test_LineString_constructor (t) {
t.plan( 3 );
line = new OpenLayers.Geometry.LineString();
t.ok( line instanceof OpenLayers.Geometry.LineString, "new OpenLayers.Geometry.LineString returns line object" );
@@ -14,7 +14,7 @@
t.eq( line.components, [], "line.components is set correctly");
}
function test_01a_LineString_constructor (t) {
function test_LineString_constructor (t) {
t.plan( 3 );
line = new OpenLayers.Geometry.LineString(components);
t.ok( line instanceof OpenLayers.Geometry.LineString, "new OpenLayers.Geometry.LineString returns line object" );
@@ -24,7 +24,7 @@
t.eq( line.components.length, 2, "line.components.length is set correctly");
}
function test_02_LineString_toString(t) {
function test_LineString_toString(t) {
t.plan(1);
line = new OpenLayers.Geometry.LineString(components);
@@ -33,7 +33,7 @@
"toString() returns WKT");
}
function test_03_LineString_removeComponent(t) {
function test_LineString_removeComponent(t) {
t.plan(2);
OpenLayers.Geometry.Collection.prototype._removeComponent =
@@ -55,7 +55,7 @@
OpenLayers.Geometry.Collection.prototype._removeComponent;
}
function test_04_LineString_move(t) {
function test_LineString_move(t) {
t.plan(4);
var components = [new OpenLayers.Geometry.Point(10,15),

View File

@@ -6,7 +6,7 @@
var components = [new OpenLayers.Geometry.Point(10,10),
new OpenLayers.Geometry.Point(0,0)];
function test_01_LinearRing_constructor (t) {
function test_LinearRing_constructor (t) {
t.plan( 6 );
//null
@@ -22,7 +22,7 @@
t.eq( ring.components.length, 3, "ring.components.length is set correctly");
}
function test_02_LinearRing_addComponent(t) {
function test_LinearRing_addComponent(t) {
t.plan(13);
var ring = new OpenLayers.Geometry.LinearRing();
@@ -57,7 +57,7 @@
}
function test_03_LinearRing_removeComponent(t) {
function test_LinearRing_removeComponent(t) {
t.plan(11);
var components = [new OpenLayers.Geometry.Point(0,0),
@@ -89,7 +89,7 @@
}
function test_04_LinearRing_getArea(t) {
function test_LinearRing_getArea(t) {
t.plan(1);
var components = [new OpenLayers.Geometry.Point(0,0),
new OpenLayers.Geometry.Point(0,10),

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var line;
function test_01_MultiLineString_constructor (t) {
function test_MultiLineString_constructor (t) {
t.plan( 3 );
mline = new OpenLayers.Geometry.MultiLineString();
t.ok( mline instanceof OpenLayers.Geometry.MultiLineString, "new OpenLayers.Geometry.MultiLineString returns mline object" );
@@ -12,7 +12,7 @@
t.eq( mline.components, [], "line.components is set correctly");
}
function test_01a_MultiLineString_constructor (t) {
function test_MultiLineString_constructor (t) {
t.plan( 3 );
line = new OpenLayers.Geometry.LineString();
mline = new OpenLayers.Geometry.MultiLineString(line);

View File

@@ -5,14 +5,14 @@
var point = new OpenLayers.Geometry.Point(10, 15);
function test_01_MultiPoint_constructor (t) {
function test_MultiPoint_constructor (t) {
t.plan( 2 );
var multipoint = new OpenLayers.Geometry.MultiPoint();
t.ok( multipoint instanceof OpenLayers.Geometry.MultiPoint, "new OpenLayers.Geometry.MultiPoint returns multipoint object" );
t.eq( multipoint.CLASS_NAME, "OpenLayers.Geometry.MultiPoint", "multipoint.CLASS_NAME is set correctly");
}
function test_01a_MultiPoint_constructor (t) {
function test_MultiPoint_constructor (t) {
t.plan( 3 );
var multipoint = new OpenLayers.Geometry.MultiPoint([point]);
t.ok( multipoint instanceof OpenLayers.Geometry.MultiPoint, "new OpenLayers.Geometry.MultiPoint returns multipoint object" );
@@ -20,7 +20,7 @@
t.eq( multipoint.components.length, 1, "multipolygon.components.length is set correctly");
}
function test_02_MultiPoint_move(t) {
function test_MultiPoint_move(t) {
t.plan(2);
var multipoint = new OpenLayers.Geometry.MultiPoint([point]);

View File

@@ -11,14 +11,14 @@
var polygon = new OpenLayers.Geometry.Polygon([linearRing]);
var polygon2 = new OpenLayers.Geometry.Polygon([linearRing2]);
function test_01_MultiPolygon_constructor (t) {
function test_MultiPolygon_constructor (t) {
t.plan( 2 );
multipolygon = new OpenLayers.Geometry.MultiPolygon();
t.ok( multipolygon instanceof OpenLayers.Geometry.MultiPolygon, "new OpenLayers.Geometry.MultiPolygon returns multipolygon object" );
t.eq( multipolygon.CLASS_NAME, "OpenLayers.Geometry.MultiPolygon", "multipolygon.CLASS_NAME is set correctly");
}
function test_01a_MultiPolygon_constructor (t) {
function test_MultiPolygon_constructor (t) {
t.plan( 3 );
multipolygon = new OpenLayers.Geometry.MultiPolygon([polygon, polygon2]);
t.ok( multipolygon instanceof OpenLayers.Geometry.MultiPolygon, "new OpenLayers.Geometry.MultiPolygon returns multipolygon object" );

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var point;
function test_01_Point_constructor (t) {
function test_Point_constructor (t) {
t.plan( 8 );
//empty
@@ -24,7 +24,7 @@
t.eq( point.lat, null, "point.lat is not set");
}
function test_03_Point_calculateBounds (t) {
function test_Point_calculateBounds (t) {
t.plan(4);
var x = 10;
@@ -37,7 +37,7 @@
t.eq( point.bounds.bottom, y, "bounds.bottom is 20" );
}
function test_04_Point_distanceTo(t) {
function test_Point_distanceTo(t) {
t.plan(2);
var x1 = 10;
@@ -53,7 +53,7 @@
t.eq( dist, Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)), "distance calculation correct");
}
function test_05_Point_toString(t) {
function test_Point_toString(t) {
t.plan(1);
var x = 10;
@@ -64,7 +64,7 @@
}
function test_06_Point_move(t) {
function test_Point_move(t) {
t.plan(3);
var x = 10;

View File

@@ -8,7 +8,7 @@
var linearRing = new OpenLayers.Geometry.LinearRing(components);
var linearRing2 = new OpenLayers.Geometry.LinearRing(components2);
function test_01_Polygon_constructor (t) {
function test_Polygon_constructor (t) {
t.plan( 3 );
polygon = new OpenLayers.Geometry.Polygon();
t.ok( polygon instanceof OpenLayers.Geometry.Polygon, "new OpenLayers.Geometry.Polygon returns polygon object" );
@@ -16,7 +16,7 @@
t.eq( polygon.components.length, 0, "polygon.components is set correctly");
}
function test_01a_Polygon_constructor (t) {
function test_Polygon_constructor (t) {
t.plan( 3 );
polygon = new OpenLayers.Geometry.Polygon([linearRing]);
t.ok( polygon instanceof OpenLayers.Geometry.Polygon, "new OpenLayers.Geometry.Polygon returns polygon object" );
@@ -24,7 +24,7 @@
t.eq( polygon.components.length, 1, "polygon.components.length is set correctly");
}
function test_01b_Polygon_constructor (t) {
function test_Polygon_constructor (t) {
t.plan( 3 );
polygon = new OpenLayers.Geometry.Polygon([linearRing, linearRing2]);
t.ok( polygon instanceof OpenLayers.Geometry.Polygon, "new OpenLayers.Geometry.Polygon returns polygon object" );
@@ -32,7 +32,7 @@
t.eq( polygon.components.length, 2, "polygon.components.length is set correctly");
}
function test_02_Polygon_getArea(t) {
function test_Polygon_getArea(t) {
t.plan( 5 );
//no components
@@ -85,7 +85,7 @@
}
function test_03_Polygon_move(t) {
function test_Polygon_move(t) {
t.plan(4);
polygon = new OpenLayers.Geometry.Polygon([linearRing, linearRing2]);

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_01_Rectangle_constructor (t) {
function test_Rectangle_constructor (t) {
t.plan( 8 );
//empty
@@ -25,7 +25,7 @@
t.eq( rect.height, h, "good init correctly sets height property");
}
function test_02_Rectangle_calculateBounds(t) {
function test_Rectangle_calculateBounds(t) {
t.plan(1);
var x = 1;
@@ -40,7 +40,7 @@
t.ok( rect.bounds.equals(testBounds), "calculateBounds works correctly");
}
function test_03_Rectangle_getLength(t) {
function test_Rectangle_getLength(t) {
t.plan(1);
var x = 1;
@@ -54,7 +54,7 @@
t.eq(rect.getLength(), testLength, "getLength() works");
}
function test_04_Rectangle_getArea(t) {
function test_Rectangle_getArea(t) {
t.plan(1);
var x = 1;

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_01_Surface_constructor (t) {
function test_Surface_constructor (t) {
t.plan( 2 );
var g = new OpenLayers.Geometry.Surface();