From c58fca2b8eb3676bc38dead4594ce78c2198c81d Mon Sep 17 00:00:00 2001 From: "pschwartau%netscape.com" Date: Fri, 5 Oct 2001 18:36:06 +0000 Subject: [PATCH] Improving comments. git-svn-id: svn://10.0.0.236/trunk@104669 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/tests/js1_5/Array/array-001.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mozilla/js/tests/js1_5/Array/array-001.js b/mozilla/js/tests/js1_5/Array/array-001.js index fe7926c9581..376a145fddc 100644 --- a/mozilla/js/tests/js1_5/Array/array-001.js +++ b/mozilla/js/tests/js1_5/Array/array-001.js @@ -19,13 +19,13 @@ * Contributor(s): igor@icesoft.no, pschwartau@netscape.com * Date: 24 September 2001 * -* SUMMARY: Testing arrays that are large but sparse +* SUMMARY: Truncating arrays with non-index decimal property names. * From correspondence with Igor Bukanov : */ //----------------------------------------------------------------------------- var UBound = 0; var bug = '(none)'; -var summary = 'Testing arrays that are large but sparse -'; +var summary = 'Truncating arrays with non-index decimal property names'; var BIG_INDEX = 4294967290; var status = ''; var statusitems = []; @@ -41,6 +41,8 @@ arr = Array(BIG_INDEX); arr[BIG_INDEX - 1] = 'a'; arr[BIG_INDEX - 10000] = 'b'; arr[BIG_INDEX - 0.5] = 'c'; // not an array index - but a valid property name + +// Truncate the array - arr.length = BIG_INDEX - 5000; var s = ''; @@ -51,8 +53,8 @@ for (var i in arr) /* - * We expect s='cb' (or 'bc': EcmaScript does not fix the order). - * Note 'c' is included, since for..in includes ALL enumerable properties, + * We expect s == 'cb' or 'bc' (EcmaScript does not fix the order). + * Note 'c' is included, as for..in includes ALL enumerable properties, * not just array-index properties. The bug was: Rhino was giving s=''. */ actual = sortThis(s);