Add tile tests. Next to do is to figure out how to set up tests for subclasses... should they go in the parent level test object, or in a seperate test object?
git-svn-id: http://svn.openlayers.org/trunk/openlayers@88 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<li>test_Bounds.html</li>
|
||||
<li>test_Events.html</li>
|
||||
<li>test_Layer.html</li>
|
||||
<li>test_Tile.html</li>
|
||||
<li>test_Control.html</li>
|
||||
<li>test_Map.html</li>
|
||||
</ul>
|
||||
|
||||
30
tests/test_Tile.html
Normal file
30
tests/test_Tile.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<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.minlat, 1, "tile.bounds.minlat is set correctly");
|
||||
t.eq( tile.bounds.maxlat, 3, "tile.bounds.maxlat is set correctly");
|
||||
t.eq( tile.bounds.minlon, 2, "tile.bounds.minlon is set correctly");
|
||||
t.eq( tile.bounds.maxlon, 4, "tile.bounds.maxlon 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>
|
||||
|
||||
Reference in New Issue
Block a user