4 while (bigString.length < 200000)
5 bigString = bigString + bigString;
7 if (bigString.length != 393216)
8 throw "Error: bad string length: " + bigString.length;
10 var result = /(x)(y)(z)/[Symbol.split](bigString);
12 if (result.length != 524289)
13 throw "Error: bad result array length: " + result.length;
16 throw "Error: array does not start with an empty string.";
18 for (var i = 1; i < result.length; i += 4) {
19 if (result[i + 0] != "x")
20 throw "Error: array does not contain \"x\" at i = " + i + " + 0: " + result[i + 0];
21 if (result[i + 1] != "y")
22 throw "Error: array does not contain \"y\" at i = " + i + " + 1: " + result[i + 1];
23 if (result[i + 2] != "z")
24 throw "Error: array does not contain \"z\" at i = " + i + " + 2: " + result[i + 2];
25 if (result[i + 3] != "")
26 throw "Error: array does not contain \"\" at i = " + i + " + 3: " + result[i + 3];