more cleanup of tests. adding ';' to end of function definition and other minor coding style mods. tests still pass in IE6/FF.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4153 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-08-31 12:31:43 +00:00
parent 0c108138e8
commit a8d7097e67
5 changed files with 73 additions and 64 deletions

View File

@@ -2,8 +2,9 @@
<head>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var marker;
var marker;
function test_01_Marker_constructor (t) {
t.plan( 4 );
var ll = new OpenLayers.LonLat(2,1);
@@ -12,7 +13,7 @@
t.ok( marker.icon instanceof OpenLayers.Icon, "new marker.Icon returns Icon object" );
t.ok( marker.lonlat instanceof OpenLayers.LonLat, "new marker.lonlat returns LonLat object" );
t.ok( marker.lonlat.equals(ll), "marker.lonlat returns correct" );
}
};
function test_02_Marker_onScreen(t) {
t.plan( 2 );
@@ -43,7 +44,7 @@
t.ok( !marker2.onScreen(), "marker knows it's offscreen" );
map.destroy();
}
};
function test_03_Marker_setOpacity(t) {
t.plan( 2 );
@@ -71,7 +72,8 @@
t.eq(parseFloat(marker.icon.imageDiv.style.opacity), 0.5, "marker.setOpacity() works");
map.destroy();
}
};
function test_04_Marker_moveTo(t) {
t.plan( 6 );
@@ -103,9 +105,7 @@
t.eq(marker.lonlat.lon, map.getExtent().left, "on left edge of map");
t.eq(marker.lonlat.lat, map.getExtent().top, "on top edge of map");
map.destroy();
}
};
</script>
</head>