| throw(" Expect: " + y + ", actual: " + x); |
| for (var k = 0; k < 2000; ++k) |
| var expectedLength = 2000; |
| assert(s2.length, expectedLength); |
| for (var i = 0; i < 22; ++i) { |
| expectedLength += expectedLength; |
| assert(s2.length, expectedLength); |
| expectedLength = ((s1.length - 1) * s2.length) + 1; |
| result = Array.prototype.join.apply(s1, [s2]); |
| assert(result.length, expectedLength); |
| throw("Array.prototype.join should have thrown an exception when string length overflows"); |
| assert(caughtException, "Error: Out of memory"); |