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

Unified Diff: tests/corelib_strong/regexp/unicodeCaseInsensitive_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/unicodeCaseInsensitive_test.dart
diff --git a/tests/corelib_strong/regexp/unicodeCaseInsensitive_test.dart b/tests/corelib_strong/regexp/unicodeCaseInsensitive_test.dart
index 44eb86e3f8c6290d07d5ed8f43ad9f380c6dc24a..a4c985bde70f321815625cbbe74e83d672df81eb 100644
--- a/tests/corelib_strong/regexp/unicodeCaseInsensitive_test.dart
+++ b/tests/corelib_strong/regexp/unicodeCaseInsensitive_test.dart
@@ -26,7 +26,8 @@ import 'v8_regexp_utils.dart';
import 'package:expect/expect.dart';
void main() {
- shouldBeTrue(new RegExp(r"ΣΤΙΓΜΑΣ", caseSensitive: false).hasMatch("στιγμας"));
+ shouldBeTrue(
+ new RegExp(r"ΣΤΙΓΜΑΣ", caseSensitive: false).hasMatch("στιγμας"));
shouldBeTrue(new RegExp(r"ΔΣΔ", caseSensitive: false).hasMatch("δςδ"));
shouldBeTrue(new RegExp(r"ς", caseSensitive: false).hasMatch("σ"));
shouldBeTrue(new RegExp(r"σ", caseSensitive: false).hasMatch("ς"));
@@ -36,30 +37,34 @@ void main() {
// Test the sets of USC2 code points that have more than one canonically equivalent value.
dynamic ucs2CodePoint(x) => new String.fromCharCode(x);
- dynamic testSet(s)
- {
- for (var i in s) {
- for (var j in s) {
- shouldBeTrue(new RegExp(ucs2CodePoint(i), caseSensitive: false).hasMatch(ucs2CodePoint(j)));
- shouldBeTrue(new RegExp("[${ucs2CodePoint(i - 1)}-${ucs2CodePoint(i + 1)}]", caseSensitive: false).hasMatch(ucs2CodePoint(j)));
- }
+ dynamic testSet(s) {
+ for (var i in s) {
+ for (var j in s) {
+ shouldBeTrue(new RegExp(ucs2CodePoint(i), caseSensitive: false)
+ .hasMatch(ucs2CodePoint(j)));
+ shouldBeTrue(new RegExp(
+ "[${ucs2CodePoint(i - 1)}-${ucs2CodePoint(i + 1)}]",
+ caseSensitive: false)
+ .hasMatch(ucs2CodePoint(j)));
}
+ }
}
- testSet([ 0x01c4, 0x01c5, 0x01c6 ]);
- testSet([ 0x01c7, 0x01c8, 0x01c9 ]);
- testSet([ 0x01ca, 0x01cb, 0x01cc ]);
- testSet([ 0x01f1, 0x01f2, 0x01f3 ]);
- testSet([ 0x0392, 0x03b2, 0x03d0 ]);
- testSet([ 0x0395, 0x03b5, 0x03f5 ]);
- testSet([ 0x0398, 0x03b8, 0x03d1 ]);
- testSet([ 0x0345, 0x0399, 0x03b9, 0x1fbe ]);
- testSet([ 0x039a, 0x03ba, 0x03f0 ]);
- testSet([ 0x00b5, 0x039c, 0x03bc ]);
- testSet([ 0x03a0, 0x03c0, 0x03d6 ]);
- testSet([ 0x03a1, 0x03c1, 0x03f1 ]);
- testSet([ 0x03a3, 0x03c2, 0x03c3 ]);
- testSet([ 0x03a6, 0x03c6, 0x03d5 ]);
- testSet([ 0x1e60, 0x1e61, 0x1e9b ]);
+
+ testSet([0x01c4, 0x01c5, 0x01c6]);
+ testSet([0x01c7, 0x01c8, 0x01c9]);
+ testSet([0x01ca, 0x01cb, 0x01cc]);
+ testSet([0x01f1, 0x01f2, 0x01f3]);
+ testSet([0x0392, 0x03b2, 0x03d0]);
+ testSet([0x0395, 0x03b5, 0x03f5]);
+ testSet([0x0398, 0x03b8, 0x03d1]);
+ testSet([0x0345, 0x0399, 0x03b9, 0x1fbe]);
+ testSet([0x039a, 0x03ba, 0x03f0]);
+ testSet([0x00b5, 0x039c, 0x03bc]);
+ testSet([0x03a0, 0x03c0, 0x03d6]);
+ testSet([0x03a1, 0x03c1, 0x03f1]);
+ testSet([0x03a3, 0x03c2, 0x03c3]);
+ testSet([0x03a6, 0x03c6, 0x03d5]);
+ testSet([0x1e60, 0x1e61, 0x1e9b]);
// Test a couple of lo/hi pairs
shouldBeTrue(new RegExp(r"\u03cf", caseSensitive: false).hasMatch("\u03cf"));
@@ -80,8 +85,10 @@ void main() {
shouldBeTrue(new RegExp(r"\u048a", caseSensitive: false).hasMatch("\u048b"));
shouldBeTrue(new RegExp(r"\u048b", caseSensitive: false).hasMatch("\u048b"));
shouldBeFalse(new RegExp(r"\u048c", caseSensitive: false).hasMatch("\u048b"));
- shouldBeTrue(new RegExp(r"[\u0489-\u048a]", caseSensitive: false).hasMatch("\u048b"));
- shouldBeTrue(new RegExp(r"[\u048b-\u048c]", caseSensitive: false).hasMatch("\u048a"));
+ shouldBeTrue(
+ new RegExp(r"[\u0489-\u048a]", caseSensitive: false).hasMatch("\u048b"));
+ shouldBeTrue(
+ new RegExp(r"[\u048b-\u048c]", caseSensitive: false).hasMatch("\u048a"));
// Test an unaligned alternating capitalization pair.
shouldBeFalse(new RegExp(r"\u04c4", caseSensitive: false).hasMatch("\u04c5"));
@@ -92,8 +99,10 @@ void main() {
shouldBeTrue(new RegExp(r"\u04c5", caseSensitive: false).hasMatch("\u04c6"));
shouldBeTrue(new RegExp(r"\u04c6", caseSensitive: false).hasMatch("\u04c6"));
shouldBeFalse(new RegExp(r"\u04c7", caseSensitive: false).hasMatch("\u04c6"));
- shouldBeTrue(new RegExp(r"[\u04c4-\u04c5]", caseSensitive: false).hasMatch("\u04c6"));
- shouldBeTrue(new RegExp(r"[\u04c6-\u04c7]", caseSensitive: false).hasMatch("\u04c5"));
+ shouldBeTrue(
+ new RegExp(r"[\u04c4-\u04c5]", caseSensitive: false).hasMatch("\u04c6"));
+ shouldBeTrue(
+ new RegExp(r"[\u04c6-\u04c7]", caseSensitive: false).hasMatch("\u04c5"));
var successfullyParsed = true;
}

Powered by Google App Engine
This is Rietveld 408576698