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

Side by Side Diff: test/mjsunit/es6/unicode-regexp-last-index.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, 6 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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-unicode-regexps --harmony-regexp-lookbehind 5 // Flags: --harmony-regexp-lookbehind
6 6
7 var r = /./ug; 7 var r = /./ug;
8 assertEquals(["\ud800\udc00"], r.exec("\ud800\udc00\ud801\udc01")); 8 assertEquals(["\ud800\udc00"], r.exec("\ud800\udc00\ud801\udc01"));
9 assertEquals(2, r.lastIndex); 9 assertEquals(2, r.lastIndex);
10 r.lastIndex = 1; 10 r.lastIndex = 1;
11 assertEquals(["\ud800\udc00"], r.exec("\ud800\udc00\ud801\udc01")); 11 assertEquals(["\ud800\udc00"], r.exec("\ud800\udc00\ud801\udc01"));
12 assertEquals(2, r.lastIndex); 12 assertEquals(2, r.lastIndex);
13 assertEquals(["\ud801\udc01"], r.exec("\ud800\udc00\ud801\udc01")); 13 assertEquals(["\ud801\udc01"], r.exec("\ud800\udc00\ud801\udc01"));
14 r.lastIndex = 3; 14 r.lastIndex = 3;
15 assertEquals(["\ud801\udc01"], r.exec("\ud800\udc00\ud801\udc01")); 15 assertEquals(["\ud801\udc01"], r.exec("\ud800\udc00\ud801\udc01"));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 r = /(?:(^.)|.)/g; 96 r = /(?:(^.)|.)/g;
97 assertEquals(["\ud800", "\ud800"], 97 assertEquals(["\ud800", "\ud800"],
98 r.exec("\ud800\udc00\ud801\udc01")); 98 r.exec("\ud800\udc00\ud801\udc01"));
99 assertEquals(1, r.lastIndex); 99 assertEquals(1, r.lastIndex);
100 assertEquals(["\udc00", undefined], r.exec("\ud800\udc00\ud801\udc01")); 100 assertEquals(["\udc00", undefined], r.exec("\ud800\udc00\ud801\udc01"));
101 assertEquals(2, r.lastIndex); 101 assertEquals(2, r.lastIndex);
102 r.lastIndex = 3; 102 r.lastIndex = 3;
103 assertEquals(["\udc01", undefined], r.exec("\ud800\udc00\ud801\udc01")); 103 assertEquals(["\udc01", undefined], r.exec("\ud800\udc00\ud801\udc01"));
104 assertEquals(4, r.lastIndex); 104 assertEquals(4, r.lastIndex);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/unicode-regexp-ignore-case-noi18n.js ('k') | test/mjsunit/es6/unicode-regexp-restricted-syntax.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698