tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S15.10.7_A1_T2.js (616B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: RegExp instance has no [[Call]] internal method
      6 es5id: 15.10.7_A1_T2
      7 description: Checking if call of RegExp("a|b","g")() fails
      8 ---*/
      9 
     10 try {
     11  throw new Test262Error('#1.1: RegExp("a|b","g")() throw TypeError. Actual: ' + (RegExp("a|b","g")()));
     12 } catch (e) {
     13  assert.sameValue(
     14    e instanceof TypeError,
     15    true,
     16    'The result of evaluating (e instanceof TypeError) is expected to be true'
     17  );
     18 }
     19 
     20 // TODO: Convert to assert.throws() format.
     21 
     22 reportCompare(0, 0);