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

print(BUGNUMBER + ": " + summary);

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

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