| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --harmony-regexps --harmony-unicode | 5 // Flags: --harmony-regexps --harmony-unicode-regexps |
| 6 | 6 |
| 7 RegExp.prototype.flags = 'setter should be undefined'; | 7 RegExp.prototype.flags = 'setter should be undefined'; |
| 8 | 8 |
| 9 assertEquals('', RegExp('').flags); | 9 assertEquals('', RegExp('').flags); |
| 10 assertEquals('', /./.flags); | 10 assertEquals('', /./.flags); |
| 11 assertEquals('gimuy', RegExp('', 'yugmi').flags); | 11 assertEquals('gimuy', RegExp('', 'yugmi').flags); |
| 12 assertEquals('gimuy', /foo/yumig.flags); | 12 assertEquals('gimuy', /foo/yumig.flags); |
| 13 | 13 |
| 14 var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags'); | 14 var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags'); |
| 15 assertTrue(descriptor.configurable); | 15 assertTrue(descriptor.configurable); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 }, | 47 }, |
| 48 get unicode() { | 48 get unicode() { |
| 49 map.u = counter++; | 49 map.u = counter++; |
| 50 }, | 50 }, |
| 51 get sticky() { | 51 get sticky() { |
| 52 map.y = counter++; | 52 map.y = counter++; |
| 53 } | 53 } |
| 54 }; | 54 }; |
| 55 testGenericFlags(object); | 55 testGenericFlags(object); |
| 56 assertEquals({ g: 0, i: 1, m: 2, u: 3, y: 4 }, map); | 56 assertEquals({ g: 0, i: 1, m: 2, u: 3, y: 4 }, map); |
| OLD | NEW |