| Index: test/webkit/fast/js/excessive-comma-usage.js
|
| diff --git a/test/webkit/array-index-immediate-types.js b/test/webkit/fast/js/excessive-comma-usage.js
|
| similarity index 67%
|
| copy from test/webkit/array-index-immediate-types.js
|
| copy to test/webkit/fast/js/excessive-comma-usage.js
|
| index 7bacc9d0fc2751ed6b0f943e64a9993226b10d1c..d30ff6d0f88a0d8112384def59f68946a35cf57f 100644
|
| --- a/test/webkit/array-index-immediate-types.js
|
| +++ b/test/webkit/fast/js/excessive-comma-usage.js
|
| @@ -21,24 +21,23 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -description(
|
| -"This test checks the behaviour of indexing an Array with immediate types."
|
| -);
|
| +description("Test that we can handle excessively large initializer lists");
|
|
|
| -var array = ["Zero", "One"];
|
| +var initializerTestString = "var a=0";
|
| +for (var i = 0; i < 50000; i++)
|
| + initializerTestString += ",a"+i+"="+i;
|
| +initializerTestString += ";return true;";
|
|
|
| -shouldBe("array[0]", '"Zero"');
|
| -shouldBe("array[null]", "undefined");
|
| -shouldBe("array[undefined]", "undefined");
|
| -shouldBe("array[true]", "undefined");
|
| -shouldBe("array[false]", "undefined");
|
| +var declarationTestString = "var a";
|
| +for (var i = 0; i < 50000; i++)
|
| + declarationTestString += ",a"+i;
|
| +declarationTestString += ";return true;";
|
|
|
| -function putSelf(array, index)
|
| -{
|
| - index = index << 0;
|
| - array[index] = index;
|
| - return true;
|
| -}
|
| +var commaExpressionTestString = "1";
|
| +for (var i = 0; i < 50000; i++)
|
| + commaExpressionTestString += ",1";
|
| +commaExpressionTestString += ";return true;";
|
|
|
| -shouldBeTrue("putSelf([0], 0);");
|
| -shouldBeTrue("putSelf([0], 1/9);");
|
| +shouldBeTrue("new Function(initializerTestString)()");
|
| +shouldBeTrue("new Function(declarationTestString)()");
|
| +shouldBeTrue("new Function(commaExpressionTestString)()");
|
|
|