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

Unified Diff: tests/corelib_strong/regexp/UC16_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/UC16_test.dart
diff --git a/tests/corelib_strong/regexp/UC16_test.dart b/tests/corelib_strong/regexp/UC16_test.dart
index c8a16deaa50c775ce4cd53ece31728ef379f4301..41e5dc8b9fd2d8a924cb8698b4c5152aaa1d9f39 100644
--- a/tests/corelib_strong/regexp/UC16_test.dart
+++ b/tests/corelib_strong/regexp/UC16_test.dart
@@ -33,21 +33,38 @@ void main() {
// UC16
// Characters used:
// "\u03a3\u03c2\u03c3\u039b\u03bb" - Sigma, final sigma, sigma, Lambda, lamda
- shouldBe(new RegExp(r"x(.)\1x", caseSensitive: false).firstMatch("x\u03a3\u03c3x"),
- ["x\u03a3\u03c3x", "\u03a3"], "backref-UC16");
- assertFalse(new RegExp(r"x(...)\1", caseSensitive: false).hasMatch("x\u03a3\u03c2\u03c3\u03c2\u03c3"),
- "\1 ASCII, string short");
- assertTrue(new RegExp(r"\u03a3((?:))\1\1x", caseSensitive: false).hasMatch("\u03c2x"), "backref-UC16-empty");
- assertTrue(new RegExp(r"x(?:...|(...))\1x", caseSensitive: false).hasMatch("x\u03a3\u03c2\u03c3x"),
- "backref-UC16-uncaptured");
- assertTrue(new RegExp(r"x(?:...|(...))\1x", caseSensitive: false).hasMatch("x\u03c2\u03c3\u039b\u03a3\u03c2\u03bbx"),
- "backref-UC16-backtrack");
- var longUC16String = "x\u03a3\u03c2\u039b\u03c2\u03c3\u03bb\u03c3\u03a3\u03bb";
- shouldBe(new RegExp(r"x(...)\1\1", caseSensitive: false).firstMatch(longUC16String),
- [longUC16String, longUC16String.substring(1,4)],
- "backref-UC16-twice");
+ shouldBe(
+ new RegExp(r"x(.)\1x", caseSensitive: false).firstMatch("x\u03a3\u03c3x"),
+ ["x\u03a3\u03c3x", "\u03a3"],
+ "backref-UC16");
+ assertFalse(
+ new RegExp(r"x(...)\1", caseSensitive: false)
+ .hasMatch("x\u03a3\u03c2\u03c3\u03c2\u03c3"),
+ "\1 ASCII, string short");
+ assertTrue(
+ new RegExp(r"\u03a3((?:))\1\1x", caseSensitive: false)
+ .hasMatch("\u03c2x"),
+ "backref-UC16-empty");
+ assertTrue(
+ new RegExp(r"x(?:...|(...))\1x", caseSensitive: false)
+ .hasMatch("x\u03a3\u03c2\u03c3x"),
+ "backref-UC16-uncaptured");
+ assertTrue(
+ new RegExp(r"x(?:...|(...))\1x", caseSensitive: false)
+ .hasMatch("x\u03c2\u03c3\u039b\u03a3\u03c2\u03bbx"),
+ "backref-UC16-backtrack");
+ var longUC16String =
+ "x\u03a3\u03c2\u039b\u03c2\u03c3\u03bb\u03c3\u03a3\u03bb";
+ shouldBe(
+ new RegExp(r"x(...)\1\1", caseSensitive: false)
+ .firstMatch(longUC16String),
+ [longUC16String, longUC16String.substring(1, 4)],
+ "backref-UC16-twice");
- assertFalse(new RegExp(r"\xc1", caseSensitive: false).hasMatch('fooA'), "quickcheck-uc16-pattern-ascii-subject");
- assertFalse(new RegExp(r"[\xe9]").hasMatch('i'), "charclass-uc16-pattern-ascii-subject");
- assertFalse(new RegExp(r"\u5e74|\u6708").hasMatch('t'), "alternation-uc16-pattern-ascii-subject");
+ assertFalse(new RegExp(r"\xc1", caseSensitive: false).hasMatch('fooA'),
+ "quickcheck-uc16-pattern-ascii-subject");
+ assertFalse(new RegExp(r"[\xe9]").hasMatch('i'),
+ "charclass-uc16-pattern-ascii-subject");
+ assertFalse(new RegExp(r"\u5e74|\u6708").hasMatch('t'),
+ "alternation-uc16-pattern-ascii-subject");
}

Powered by Google App Engine
This is Rietveld 408576698