Projection cannot be null.

This commit is contained in:
Tim Schaub
2012-06-19 17:41:17 +02:00
parent 6ed79a3d36
commit 408413ec92
3 changed files with 29 additions and 33 deletions

View File

@@ -27,19 +27,17 @@ describe("ol.Projection", function() {
it("handles transforms", function() {
var orig = {x: 10, y: 20, z: 30};
var point = {x: 10, y: 20, z: 30};
var point = ol.Projection.transform(orig, "EPSG:4326", "EPSG:900913");
var ret = ol.Projection.transform(point, "EPSG:4326", "EPSG:900913");
expect(ret).toBeUndefined();
// original is modified
expect(point.x.toFixed(3)).toBe("1113194.908");
expect(point.y.toFixed(3)).toBe("2273030.927");
expect(point.z).toBe(30);
// original remains unchanged
expect(orig.x).toBe(10);
expect(orig.y).toBe(20);
expect(orig.z).toBe(30);
});
});