bring back r6710 now that popup changes are in
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6719 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
30
tests/Projection.html
Normal file
30
tests/Projection.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
function test_01_Projection_constructor(t) {
|
||||
t.plan(9);
|
||||
|
||||
var options = {'foo': 'bar'};
|
||||
var projection = new OpenLayers.Projection("code", options);
|
||||
t.ok(projection instanceof OpenLayers.Projection,
|
||||
"new OpenLayers.Projection returns object" );
|
||||
t.eq(projection.projCode, "code", "The proj code is maintained");
|
||||
t.eq(projection.getCode(), "code", "The proj code is maintained.");
|
||||
t.eq(projection.getUnits(), null, "Null units with no proj4js library.");
|
||||
t.eq(projection.foo, "bar", "constructor sets options correctly");
|
||||
|
||||
var projection2 = new OpenLayers.Projection("epsg:4325", options);
|
||||
out = OpenLayers.Projection.transform({'x':10,'y':12}, projection, projection2);
|
||||
t.eq(out.x, 10, "Null transform has no effect");
|
||||
t.eq(out.y, 12, "Null transform has no effect");
|
||||
|
||||
t.eq(projection.equals(null), false, "equals on null projection returns false");
|
||||
t.eq(projection.equals({}), false, "equals on null projection object returns false (doesn't call getCode)");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user