summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/regexp/RegExpExec-errors.js
blob: bee579859fe1c43af120ba535fce33e9b9194382 (plain)
1
2
3
4
5
6
load(libdir + "asserts.js");

assertErrorMessage(() => RegExp.prototype.test.call({}), TypeError,
                   /test method called on incompatible Object/);
assertErrorMessage(() => RegExp.prototype[Symbol.match].call([]), TypeError,
                   /\[Symbol\.match\] method called on incompatible Array/);