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

Side by Side Diff: test/mjsunit/es6/unicode-escapes-in-regexps.js

Issue 2096933002: Remove all harmony runtime flags which shipped in M51 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments Created 4 years, 5 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
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 // ES6 extends the \uxxxx escape and also allows \u{xxxxx}. 5 // ES6 extends the \uxxxx escape and also allows \u{xxxxx}.
6 6
7 // Flags: --harmony-unicode-regexps
8
9 function testRegexpHelper(r) { 7 function testRegexpHelper(r) {
10 assertTrue(r.test("foo")); 8 assertTrue(r.test("foo"));
11 assertTrue(r.test("boo")); 9 assertTrue(r.test("boo"));
12 assertFalse(r.test("moo")); 10 assertFalse(r.test("moo"));
13 } 11 }
14 12
15 13
16 (function TestUnicodeEscapes() { 14 (function TestUnicodeEscapes() {
17 testRegexpHelper(/(\u0066|\u0062)oo/); 15 testRegexpHelper(/(\u0066|\u0062)oo/);
18 testRegexpHelper(/(\u0066|\u0062)oo/u); 16 testRegexpHelper(/(\u0066|\u0062)oo/u);
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 assertNull(new RegExp("\ud800\\udc00+", "u").exec("\u{10000}\u{10000}")); 276 assertNull(new RegExp("\ud800\\udc00+", "u").exec("\u{10000}\u{10000}"));
279 277
280 assertNull(new RegExp("[\\ud800\udc00]", "u").exec("\u{10000}")); 278 assertNull(new RegExp("[\\ud800\udc00]", "u").exec("\u{10000}"));
281 assertNull(new RegExp("[\\{ud800}\udc00]", "u").exec("\u{10000}")); 279 assertNull(new RegExp("[\\{ud800}\udc00]", "u").exec("\u{10000}"));
282 assertNull(new RegExp("[\ud800\\udc00]", "u").exec("\u{10000}")); 280 assertNull(new RegExp("[\ud800\\udc00]", "u").exec("\u{10000}"));
283 assertNull(new RegExp("[\ud800\\{udc00}]", "u").exec("\u{10000}")); 281 assertNull(new RegExp("[\ud800\\{udc00}]", "u").exec("\u{10000}"));
284 282
285 assertNull(/\u{d800}\u{dc00}+/u.exec("\ud800\udc00\udc00")); 283 assertNull(/\u{d800}\u{dc00}+/u.exec("\ud800\udc00\udc00"));
286 assertNull(/\ud800\u{dc00}+/u.exec("\ud800\udc00\udc00")); 284 assertNull(/\ud800\u{dc00}+/u.exec("\ud800\udc00\udc00"));
287 assertNull(/\u{d800}\udc00+/u.exec("\ud800\udc00\udc00")); 285 assertNull(/\u{d800}\udc00+/u.exec("\ud800\udc00\udc00"));
OLDNEW
« no previous file with comments | « test/mjsunit/es6/unicode-character-ranges.js ('k') | test/mjsunit/es6/unicode-regexp-backrefs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698