summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/extensions/RegExp-error-message-skip-selfhosted-frames.js
blob: fd45717476190e97c34a0bd79552c9b82acb4a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
for (let name of ["test", Symbol.match, Symbol.replace, Symbol.search]) {
    try {
        RegExp.prototype[name].call({});
    } catch (e) {
        let methodName = typeof name === "symbol" ? `[${name.description}]` : name;
        assertEq(e.message, `${methodName} method called on incompatible Object`);
    }
}

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