rolling back ;'s after a function declaration, cleaning up some whitespace. no functional changes. all tests still pass ff && ie6. note that it has never been either a policy or a priority for us to maintain coding standards in the test files. I'm only doing this as an exercise for my brain, waiting for the second cup of coffee to kick in.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4156 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+46
-13
@@ -12,30 +12,57 @@
|
||||
}
|
||||
var multipoint = new OpenLayers.Feature.Vector(
|
||||
new OpenLayers.Geometry.MultiPoint([
|
||||
points[0].geometry, points[1].geometry, points[2].geometry
|
||||
points[0].geometry,
|
||||
points[1].geometry,
|
||||
points[2].geometry
|
||||
])
|
||||
);
|
||||
|
||||
var linestrings = [
|
||||
new OpenLayers.Feature.Vector(
|
||||
new OpenLayers.Geometry.LineString([points[0].geometry, points[1].geometry, points[2].geometry])
|
||||
),
|
||||
new OpenLayers.Geometry.LineString([
|
||||
points[0].geometry,
|
||||
points[1].geometry,
|
||||
points[2].geometry
|
||||
])
|
||||
),
|
||||
new OpenLayers.Feature.Vector(
|
||||
new OpenLayers.Geometry.LineString([points[3].geometry, points[4].geometry, points[5].geometry])
|
||||
new OpenLayers.Geometry.LineString([
|
||||
points[3].geometry,
|
||||
points[4].geometry,
|
||||
points[5].geometry
|
||||
])
|
||||
)
|
||||
];
|
||||
|
||||
var multilinestring = new OpenLayers.Feature.Vector(
|
||||
new OpenLayers.Geometry.MultiLineString([
|
||||
linestrings[0].geometry, linestrings[1].geometry
|
||||
linestrings[0].geometry,
|
||||
linestrings[1].geometry
|
||||
])
|
||||
);
|
||||
|
||||
var rings = [
|
||||
new OpenLayers.Geometry.LinearRing([points[0].geometry, points[1].geometry, points[2].geometry]),
|
||||
new OpenLayers.Geometry.LinearRing([points[3].geometry, points[4].geometry, points[5].geometry]),
|
||||
new OpenLayers.Geometry.LinearRing([points[6].geometry, points[7].geometry, points[8].geometry]),
|
||||
new OpenLayers.Geometry.LinearRing([points[9].geometry, points[10].geometry, points[11].geometry])
|
||||
new OpenLayers.Geometry.LinearRing([
|
||||
points[0].geometry,
|
||||
points[1].geometry,
|
||||
points[2].geometry
|
||||
]),
|
||||
new OpenLayers.Geometry.LinearRing([
|
||||
points[3].geometry,
|
||||
points[4].geometry,
|
||||
points[5].geometry
|
||||
]),
|
||||
new OpenLayers.Geometry.LinearRing([
|
||||
points[6].geometry,
|
||||
points[7].geometry,
|
||||
points[8].geometry
|
||||
]),
|
||||
new OpenLayers.Geometry.LinearRing([
|
||||
points[9].geometry,
|
||||
points[10].geometry,
|
||||
points[11].geometry
|
||||
])
|
||||
];
|
||||
|
||||
var polygons = [
|
||||
@@ -49,7 +76,8 @@
|
||||
|
||||
var multipolygon = new OpenLayers.Feature.Vector(
|
||||
new OpenLayers.Geometry.MultiPolygon([
|
||||
polygons[0].geometry, polygons[1].geometry
|
||||
polygons[0].geometry,
|
||||
polygons[1].geometry
|
||||
])
|
||||
);
|
||||
|
||||
@@ -65,12 +93,15 @@
|
||||
t.eq(format.foo, "bar", "constructor sets options correctly");
|
||||
t.eq(typeof format.read, "function", "format has a read function");
|
||||
t.eq(typeof format.write, "function", "format has a write function");
|
||||
}
|
||||
}
|
||||
|
||||
function test_Format_WKT_write(t) {
|
||||
t.plan(7);
|
||||
|
||||
var format = new OpenLayers.Format.WKT();
|
||||
|
||||
// test a point
|
||||
|
||||
t.eq(format.write(points[0]),
|
||||
"POINT(" + points[0].geometry.x + " " + points[0].geometry.y + ")",
|
||||
"format correctly writes Point WKT");
|
||||
@@ -139,9 +170,11 @@
|
||||
points[2].geometry.x + " " + points[2].geometry.y + "))",
|
||||
"format correctly writes GeometryCollection WKT");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function test_Format_WKT_read(t) {
|
||||
t.plan(7);
|
||||
|
||||
var format = new OpenLayers.Format.WKT();
|
||||
|
||||
/**
|
||||
@@ -181,7 +214,7 @@
|
||||
points[2].geometry.x + " " + points[2].geometry.y + "))",
|
||||
"format correctly writes GeometryCollection WKT");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user