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

28 lines
861 B
HTML

<html>
<head>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"><!--
var bounds;
function test_01_Bounds_constructor (t) {
t.plan( 5 );
bounds = new OpenLayers.Bounds(1,2,3,4);
t.ok( bounds instanceof OpenLayers.Bounds, "new OpenLayers.Bounds returns Bounds object" );
t.eq( bounds.minlon, 2, "bounds.minlon is set correctly" );
t.eq( bounds.minlat, 1, "bounds.minlat is set correctly" );
t.eq( bounds.maxlon, 4, "bounds.maxlon is set correctly" );
t.eq( bounds.maxlat, 3, "bounds.maxlat is set correctly" );
}
function test_02_Bounds_toBBOX(t) {
t.plan( 1 );
bounds = new OpenLayers.Bounds(1,2,3,4);
t.eq( bounds.toBBOX(), "2,1,4,3", "toBBOX() returns correct value." )
}
// -->
</script>
</head>
<body>
</body>
</html>