Use array.indexOf native function when available. p=arno, r=ahocevar

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9859 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod committed 2009-12-04 08:07:53 +00:00
1 parent 610c2b9933
commit 4ff1ece2e4
2 files changed
+18 -6

No files matched your search

+8
View File
@@ -38,6 +38,14 @@
"getImagesLocation()" );
}
function test_Util_IndexOf(t) {
t.plan( 3 );
var array = new Array(1, "bar");
t.eq(OpenLayers.Util.indexOf(array, 1), 0);
t.eq(OpenLayers.Util.indexOf(array, "bar"), 1);
t.eq(OpenLayers.Util.indexOf(array, "foo"), -1);
}
function test_Util_Array(t) {
t.plan( 2 );