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

Unified Diff: tests/corelib_strong/regexp/assertion_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/corelib_strong/regexp/assertion_test.dart
diff --git a/tests/corelib_strong/regexp/assertion_test.dart b/tests/corelib_strong/regexp/assertion_test.dart
index 9899a85d0ae7346cbfccb90178061418f27d41b0..43ee1ca6f2c5186abe233caf1471b8e017ca149f 100644
--- a/tests/corelib_strong/regexp/assertion_test.dart
+++ b/tests/corelib_strong/regexp/assertion_test.dart
@@ -29,28 +29,28 @@ void main() {
description("This page tests handling of parenthetical assertions.");
var regex1 = new RegExp(r"(x)(?=\1)x");
- shouldBe(regex1.firstMatch('xx'), ['xx','x']);
+ shouldBe(regex1.firstMatch('xx'), ['xx', 'x']);
var regex2 = new RegExp(r"(.*?)a(?!(a+)b\2c)\2(.*)");
- shouldBe(regex2.firstMatch('baaabaac'), ['baaabaac','ba',null,'abaac']);
+ shouldBe(regex2.firstMatch('baaabaac'), ['baaabaac', 'ba', null, 'abaac']);
var regex3 = new RegExp(r"(?=(a+?))(\1ab)");
- shouldBe(regex3.firstMatch('aaab'), ['aab','a','aab']);
+ shouldBe(regex3.firstMatch('aaab'), ['aab', 'a', 'aab']);
var regex4 = new RegExp(r"(?=(a+?))(\1ab)");
- shouldBe(regex4.firstMatch('aaab'), ['aab','a','aab']);
+ shouldBe(regex4.firstMatch('aaab'), ['aab', 'a', 'aab']);
var regex5 = new RegExp(r"^P([1-6])(?=\1)([1-6])$");
- shouldBe(regex5.firstMatch('P11'), ['P11','1','1']);
+ shouldBe(regex5.firstMatch('P11'), ['P11', '1', '1']);
var regex6 = new RegExp(r"(([a-c])b*?\2)*");
- shouldBe(regex6.firstMatch('ababbbcbc'), ['ababb','bb','b']);
+ shouldBe(regex6.firstMatch('ababbbcbc'), ['ababb', 'bb', 'b']);
var regex7 = new RegExp(r"(x)(?=x)x");
- shouldBe(regex7.firstMatch('xx'), ['xx','x']);
+ shouldBe(regex7.firstMatch('xx'), ['xx', 'x']);
var regex8 = new RegExp(r"(x)(\1)");
- shouldBe(regex8.firstMatch('xx'), ['xx','x','x']);
+ shouldBe(regex8.firstMatch('xx'), ['xx', 'x', 'x']);
var regex9 = new RegExp(r"(x)(?=\1)x");
shouldBeNull(regex9.firstMatch('xy'));
@@ -63,48 +63,50 @@ void main() {
var regex12 = new RegExp(r"(x)(?=\1)x");
shouldBeNull(regex12.firstMatch('x'));
- shouldBe(regex12.firstMatch('xx'), ['xx','x']);
- shouldBe(regex12.firstMatch('xxy'), ['xx','x']);
+ shouldBe(regex12.firstMatch('xx'), ['xx', 'x']);
+ shouldBe(regex12.firstMatch('xxy'), ['xx', 'x']);
var regex13 = new RegExp(r"(x)zzz(?=\1)x");
- shouldBe(regex13.firstMatch('xzzzx'), ['xzzzx','x']);
- shouldBe(regex13.firstMatch('xzzzxy'), ['xzzzx','x']);
+ shouldBe(regex13.firstMatch('xzzzx'), ['xzzzx', 'x']);
+ shouldBe(regex13.firstMatch('xzzzxy'), ['xzzzx', 'x']);
var regex14 = new RegExp(r"(a)\1(?=(b*c))bc");
- shouldBe(regex14.firstMatch('aabc'), ['aabc','a','bc']);
- shouldBe(regex14.firstMatch('aabcx'), ['aabc','a','bc']);
+ shouldBe(regex14.firstMatch('aabc'), ['aabc', 'a', 'bc']);
+ shouldBe(regex14.firstMatch('aabcx'), ['aabc', 'a', 'bc']);
var regex15 = new RegExp(r"(a)a(?=(b*c))bc");
- shouldBe(regex15.firstMatch('aabc'), ['aabc','a','bc']);
- shouldBe(regex15.firstMatch('aabcx'), ['aabc','a','bc']);
+ shouldBe(regex15.firstMatch('aabc'), ['aabc', 'a', 'bc']);
+ shouldBe(regex15.firstMatch('aabcx'), ['aabc', 'a', 'bc']);
var regex16 = new RegExp(r"a(?=(b*c))bc");
shouldBeNull(regex16.firstMatch('ab'));
- shouldBe(regex16.firstMatch('abc'), ['abc','bc']);
+ shouldBe(regex16.firstMatch('abc'), ['abc', 'bc']);
var regex17 = new RegExp(r"(?=((?:ab)*))a");
- shouldBe(regex17.firstMatch('ab'), ['a','ab']);
- shouldBe(regex17.firstMatch('abc'), ['a','ab']);
+ shouldBe(regex17.firstMatch('ab'), ['a', 'ab']);
+ shouldBe(regex17.firstMatch('abc'), ['a', 'ab']);
var regex18 = new RegExp(r"(?=((?:xx)*))x");
- shouldBe(regex18.firstMatch('x'), ['x','']);
- shouldBe(regex18.firstMatch('xx'), ['x','xx']);
- shouldBe(regex18.firstMatch('xxx'), ['x','xx']);
+ shouldBe(regex18.firstMatch('x'), ['x', '']);
+ shouldBe(regex18.firstMatch('xx'), ['x', 'xx']);
+ shouldBe(regex18.firstMatch('xxx'), ['x', 'xx']);
var regex19 = new RegExp(r"(?=((xx)*))x");
- shouldBe(regex19.firstMatch('x'), ['x','',null]);
- shouldBe(regex19.firstMatch('xx'), ['x','xx','xx']);
- shouldBe(regex19.firstMatch('xxx'), ['x','xx','xx']);
+ shouldBe(regex19.firstMatch('x'), ['x', '', null]);
+ shouldBe(regex19.firstMatch('xx'), ['x', 'xx', 'xx']);
+ shouldBe(regex19.firstMatch('xxx'), ['x', 'xx', 'xx']);
var regex20 = new RegExp(r"(?=(xx))+x");
shouldBeNull(regex20.firstMatch('x'));
- shouldBe(regex20.firstMatch('xx'), ['x','xx']);
- shouldBe(regex20.firstMatch('xxx'), ['x','xx']);
+ shouldBe(regex20.firstMatch('xx'), ['x', 'xx']);
+ shouldBe(regex20.firstMatch('xxx'), ['x', 'xx']);
var regex21 = new RegExp(r"(?=a+b)aab");
shouldBe(regex21.firstMatch('aab'), ['aab']);
- var regex22 = new RegExp(r"(?!(u|m{0,}g+)u{1,}|2{2,}!1%n|(?!K|(?=y)|(?=ip))+?)(?=(?=(((?:7))*?)*?))p", multiLine: true);
+ var regex22 = new RegExp(
+ r"(?!(u|m{0,}g+)u{1,}|2{2,}!1%n|(?!K|(?=y)|(?=ip))+?)(?=(?=(((?:7))*?)*?))p",
+ multiLine: true);
shouldBeNull(regex22.firstMatch('55up'));
var regex23 = new RegExp(r"(?=(a)b|c?)()*d");

Powered by Google App Engine
This is Rietveld 408576698