[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    khtmltests/js
From:       Peter Kelly <pmk () post ! com>
Date:       2003-04-20 8:11:22
[Download RAW message or body]

CVS commit by pmk: 

added more tests for arrays, constructor function lengths and
encodeURI()/decodeURI()


  A            constructor_length.js   1.1
  A            encode_decode_uri.js   1.1
  M +11 -0     Array.js   1.10


--- khtmltests/js/Array.js  #1.9:1.10
@@ -112,2 +112,13 @@
 shouldBe("arr.length","maxint");
 shouldBe("arr[maxint-1]","\"test2\"");
+
+arr = new Array('a','b','c');
+arr.__proto__ = { 1: 'x' };
+var propnames = new Array();
+for (i in arr)
+  propnames.push(i);
+propnames.sort();
+shouldBe("propnames.length","3");
+shouldBe("propnames[0]","'0'");
+shouldBe("propnames[1]","'1'");
+shouldBe("propnames[2]","'2'");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic