Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.4.1_A6_T1.js

raw
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: The [[Class]] property of the newly constructed object is set to "RegExp"
6 es5id: 15.10.4.1_A6_T1
7 description: Checking [[Class]] property of the newly constructed object
8 ---*/
9
10 var __re = new RegExp;
11 __re.toString = Object.prototype.toString;
12
13 //CHECK#1
14 if (__re.toString() !== "[object "+"RegExp"+"]") {
15 $ERROR('#1: __re = new RegExp; __re.toString = Object.prototype.toString; __re.toString() === "[object "+"RegExp"+"]". Actual: ' + (__re.toString()));
16 }