| //@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py |
| function assert(testedValue, msg) { |
| // RegExp with overridden [@@species]: Testing ES6 21.2.5.11: 4. Let C be ? SpeciesConstructor(rx, %RegExp%). |
| let origDescriptor = Object.getOwnPropertyDescriptor(RegExp, Symbol.species); |
| Object.defineProperty(RegExp, Symbol.species, { |
| accesses.push(Symbol.species.toString()); |
| assert(accesses == "", "unexpected call to overridden props"); |
| let result = RegExp.prototype[Symbol.split].call(obj, "splitme"); |
| assert(accesses == "Symbol(Symbol.species)", "Property accesses do not match expectation"); |
| assert(result == "spl,me", "Unexpected result"); |