Added basic tests for Map, Layer, and Control base classes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@14 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
25
tests/test_Layer.html
Normal file
25
tests/test_Layer.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script language="text/javascript"><!--
|
||||
var layer;
|
||||
|
||||
function test_01_Layer_constructor (t) {
|
||||
t.plan( 2 );
|
||||
|
||||
layer = new OpenLayers.Layer('Test Layer');
|
||||
t.ok( layer instanceof OpenLayers.Layer, "new OpenLayers.Layer returns object" );
|
||||
t.eq( layer.name, "Test Layer", "layer.name is correct" );
|
||||
}
|
||||
|
||||
function test_99_Layer_destroy (t) {
|
||||
t.plan( 2 );
|
||||
layer.destroy();
|
||||
t.eq( layer.map, null, "layer.map is null after destroy" );
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user