Files
openlayers/tests/test_Tile.html
2006-05-17 16:20:12 +00:00

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>