Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / RegExp / S15.10.4.1_A1_T4.js
bloba66ead1e944b0b2552d05cfd15666efcca701059
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 info: |
6     If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be
7     the pattern used to construct R and let F be the flags used to construct R
8 es5id: 15.10.4.1_A1_T4
9 description: Pattern is new RegExp and RegExp is new RegExp(pattern,undefined)
10 ---*/
12 var __pattern = new RegExp;
13 var __re = new RegExp(__pattern, undefined);
15 assert.sameValue(
16   __re.source,
17   __pattern.source,
18   'The value of __re.source is expected to equal the value of __pattern.source'
21 assert.sameValue(
22   __re.multiline,
23   __pattern.multiline,
24   'The value of __re.multiline is expected to equal the value of __pattern.multiline'
27 assert.sameValue(
28   __re.global,
29   __pattern.global,
30   'The value of __re.global is expected to equal the value of __pattern.global'
33 assert.sameValue(
34   __re.ignoreCase,
35   __pattern.ignoreCase,
36   'The value of __re.ignoreCase is expected to equal the value of __pattern.ignoreCase'
39 reportCompare(0, 0);