git-svn-id: http://svn.openlayers.org/trunk/openlayers@103 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
31 lines
1.0 KiB
HTML
31 lines
1.0 KiB
HTML
<html>
|
|
<head>
|
|
<script src="../lib/OpenLayers.js"></script>
|
|
<script type="text/javascript"><!--
|
|
var tile;
|
|
|
|
function test_01_Tile_constructor (t) {
|
|
t.plan( 9 );
|
|
tile = new OpenLayers.Tile(
|
|
new OpenLayers.Bounds(1,2,3,4), "",
|
|
new OpenLayers.Size(5,6));
|
|
t.ok( tile instanceof OpenLayers.Tile, "new OpenLayers.Tile returns Tile object" );
|
|
t.ok( tile.bounds instanceof OpenLayers.Bounds, "tile.bounds is a Bounds object" );
|
|
t.eq( tile.bounds.minlon, 2, "tile.bounds.minlon is set correctly");
|
|
t.eq( tile.bounds.minlat, 1, "tile.bounds.minlat is set correctly");
|
|
t.eq( tile.bounds.maxlon, 4, "tile.bounds.maxlon is set correctly");
|
|
t.eq( tile.bounds.maxlat, 3, "tile.bounds.maxlat is set correctly");
|
|
t.ok( tile.size instanceof OpenLayers.Size, "tile.size is a Size object" );
|
|
t.eq( tile.size.w, 5, "tile.size.w is set correctly");
|
|
t.eq( tile.size.h, 6, "tile.size.h is set correctly");
|
|
}
|
|
|
|
|
|
// -->
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|
|
|