git-svn-id: http://svn.openlayers.org/trunk/openlayers@983 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
37 lines
1.1 KiB
HTML
37 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( 8 );
|
|
|
|
var layer = new Object(); // bogus layer
|
|
var position = new OpenLayers.Pixel(10,20);
|
|
var bounds = new OpenLayers.Bounds(1,2,3,4);
|
|
var url = "bobob";
|
|
var size = new OpenLayers.Size(5,6);
|
|
|
|
tile = new OpenLayers.Tile(layer, position, bounds, url, size);
|
|
|
|
t.ok( tile instanceof OpenLayers.Tile, "new OpenLayers.Tile returns Tile object" );
|
|
t.eq( tile.layer, layer, "tile.layer set correctly");
|
|
t.ok( tile.position.equals(position), "tile.position set correctly");
|
|
t.ok( tile.bounds.equals(bounds), "tile.bounds set correctly");
|
|
t.eq( tile.url, url, "tile.url set correctly");
|
|
t.ok( tile.size.equals(size), "tile.size is set correctly" );
|
|
|
|
t.ok( tile.id != null, "tile is given an id");
|
|
t.ok( tile.id.startsWith("Tile_"), "tile's id starts correctly");
|
|
}
|
|
|
|
|
|
// -->
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|
|
|