Files
openlayers/tests/test_Tile.html

33 lines
1.1 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(null,
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.left, 1, "tile.bounds.left is set correctly");
t.eq( tile.bounds.bottom, 2, "tile.bounds.bottom is set correctly");
t.eq( tile.bounds.right, 3, "tile.bounds.right is set correctly");
t.eq( tile.bounds.top, 4, "tile.bounds.top 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>