fix tests that do double-test to check lonlat or xy or wh instead of using the equals() functions

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1139 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-08-09 03:56:32 +00:00
parent 31af99c64d
commit 69876208f4
9 changed files with 49 additions and 49 deletions
+11 -11
View File
@@ -27,28 +27,27 @@
}
function test_03_LonLat_clone(t) {
t.plan( 4 );
t.plan( 3 );
oldLonLat = new OpenLayers.LonLat(5,6);
lonlat = oldLonLat.clone();
t.ok( lonlat instanceof OpenLayers.LonLat, "clone returns new OpenLayers.LonLat object" );
t.eq( lonlat.lon, 5, "lonlat.lon is set correctly");
t.eq( lonlat.lat, 6, "lonlat.lat is set correctly");
t.ok( lonlat.equals(oldLonLat), "lonlat is set correctly");
oldLonLat.lon = 100;
t.eq( lonlat.lon, 5, "changing oldLonLat.lon doesn't change lonlat.lon");
}
function test_04_LonLat_add(t) {
t.plan( 4 );
t.plan( 2 );
lonlatA = new OpenLayers.LonLat(10,100);
addpx = lonlatA.add(5, 50);
t.eq( lonlatA.lon, 10, "lonlatA.lon is not modified by add operation");
t.eq( lonlatA.lat, 100, "lonlatA.lat is not modified by add operation");
var ll = new OpenLayers.LonLat(10,100);
t.ok( lonlatA.equals(ll), "lonlatA is not modified by add operation");
t.eq( addpx.lon, 15, "addpx.lon is set correctly");
t.eq( addpx.lat, 150, "addpx.lat is set correctly");
var ll = new OpenLayers.LonLat(15,150);
t.ok( addpx.equals(ll), "addpx is set correctly");
}
function test_06_LonLat_equals(t) {
@@ -72,11 +71,12 @@
}
function test_07_LonLat_fromString(t) {
t.plan( 3 );
t.plan( 2 );
lonlat = OpenLayers.LonLat.fromString("6,5");
t.ok( lonlat instanceof OpenLayers.LonLat, "new OpenLayers.LonLat returns LonLat object" );
t.eq( lonlat.lon, 6, "lonlat.lon is set correctly");
t.eq( lonlat.lat, 5, "lonlat.lat is set correctly");
var ll = new OpenLayers.LonLat(6, 5);
t.ok( lonlat.equals(ll), "lonlat is set correctly");
}
// -->