Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/S15.10.3.1_A1_T3.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: |
6 If pattern is an object R whose [[Class]] property is "RegExp" and flags
7 is undefined, then return R unchanged
8 es5id: 15.10.3.1_A1_T3
9 description: >
10 R is new RegExp() and instance is RegExp(R, x), where x is
11 undefined variable
12 ---*/
13
14 var __re = new RegExp();
15 var __instance = RegExp(__re, x);
16 __re.indicator = 1;
17
18 assert.sameValue(__instance.indicator, 1, 'The value of __instance.indicator is expected to be 1');
19
20 var x;
21
22 reportCompare(0, 0);