summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/RegExp/replace-this.js
blob: 499304f9c06fdef60ffbac870b10e860874e3d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var BUGNUMBER = 887016;
var summary = "RegExp.prototype[@@replace] should check |this| value.";

print(BUGNUMBER + ": " + summary);

for (var v of [null, 1, true, undefined, "", Symbol.iterator]) {
  assertThrowsInstanceOf(() => RegExp.prototype[Symbol.replace].call(v),
                         TypeError);
}

if (typeof reportCompare === "function")
    reportCompare(true, true);