Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: test/mjsunit/harmony/regexp-flags.js

Issue 903703002: Split --harmony-unicode and --harmony-unicode-regexps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | test/mjsunit/harmony/unicode-escapes-in-regexps.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
OLDNEW
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | test/mjsunit/harmony/unicode-escapes-in-regexps.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698