| Index: test/mjsunit/harmony/array-concat.js
|
| diff --git a/test/mjsunit/harmony/array-concat.js b/test/mjsunit/harmony/array-concat.js
|
| index d39998d07f6b4b615eabdfef78ddc2c9d1c1f98b..6175989f3ac19026a8453b14ccd0bd4b799c4cf5 100644
|
| --- a/test/mjsunit/harmony/array-concat.js
|
| +++ b/test/mjsunit/harmony/array-concat.js
|
| @@ -304,6 +304,22 @@ function testConcatTypedArray(type, elems, modulo) {
|
| })();
|
|
|
|
|
| +(function testConcatSpreadableStringPrototype() {
|
| + var str1 = new String("yuck\uD83D\uDCA9")
|
| + // String wrapper objects are not concat-spreadable by default
|
| + assertEquals([str1], [].concat(str1));
|
| +
|
| + String.prototype[Symbol.isConcatSpreadable] = true;
|
| + // String wrapper objects may be concat-spreadable
|
| + assertEquals(["y", "u", "c", "k", "\uD83D", "\uDCA9"],
|
| + [].concat(new String("yuck\uD83D\uDCA9")));
|
| +
|
| + // String values are never concat-spreadable
|
| + assertEquals(["yuck\uD83D\uDCA9"], [].concat("yuck\uD83D\uDCA9"));
|
| + delete String.prototype[Symbol.isConcatSpreadable];
|
| +})();
|
| +
|
| +
|
| // ES5 tests
|
| (function testArrayConcatES5() {
|
| "use strict";
|
|
|