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

Unified Diff: tests/corelib_strong/regexp/bol_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/bol_test.dart
diff --git a/tests/corelib_strong/regexp/bol_test.dart b/tests/corelib_strong/regexp/bol_test.dart
index d2a479e8db091f0576734928e96a26276a636011..f3c363e653bd00f1004c6842542994c7fc3d67d8 100644
--- a/tests/corelib_strong/regexp/bol_test.dart
+++ b/tests/corelib_strong/regexp/bol_test.dart
@@ -26,30 +26,29 @@ import 'v8_regexp_utils.dart';
import 'package:expect/expect.dart';
void main() {
- description(
- 'Test for beginning of line (BOL or ^) matching</a>'
- );
+ description('Test for beginning of line (BOL or ^) matching</a>');
var s = "abc123def456xyzabc789abc999";
shouldBeNull(firstMatch(s, new RegExp(r"^notHere")));
shouldBe(firstMatch(s, new RegExp(r"^abc")), ["abc"]);
- shouldBe(firstMatch(s, new RegExp(r"(^|X)abc")), ["abc",""]);
+ shouldBe(firstMatch(s, new RegExp(r"(^|X)abc")), ["abc", ""]);
shouldBe(firstMatch(s, new RegExp(r"^longer|123")), ["123"]);
- shouldBe(firstMatch(s, new RegExp(r"(^abc|c)123")), ["abc123","abc"]);
- shouldBe(firstMatch(s, new RegExp(r"(c|^abc)123")), ["abc123","abc"]);
- shouldBe(firstMatch(s, new RegExp(r"(^ab|abc)123")), ["abc123","abc"]);
- shouldBe(firstMatch(s, new RegExp(r"(bc|^abc)([0-9]*)a")), ["bc789a","bc","789"]);
+ shouldBe(firstMatch(s, new RegExp(r"(^abc|c)123")), ["abc123", "abc"]);
+ shouldBe(firstMatch(s, new RegExp(r"(c|^abc)123")), ["abc123", "abc"]);
+ shouldBe(firstMatch(s, new RegExp(r"(^ab|abc)123")), ["abc123", "abc"]);
+ shouldBe(firstMatch(s, new RegExp(r"(bc|^abc)([0-9]*)a")),
+ ["bc789a", "bc", "789"]);
shouldBeNull(new RegExp(r"(?:(Y)X)|(X)").firstMatch("abc"));
shouldBeNull(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abc"));
shouldBeNull(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcd"));
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("Xabcd"), ["X",null]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("aXbcd"), ["X","X"]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abXcd"), ["X","X"]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcXd"), ["X","X"]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcdX"), ["X","X"]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("YXabcd"), ["YX",null]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("aYXbcd"), ["YX",null]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abYXcd"), ["YX",null]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcYXd"), ["YX",null]);
- shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcdYX"), ["YX",null]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("Xabcd"), ["X", null]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("aXbcd"), ["X", "X"]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abXcd"), ["X", "X"]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcXd"), ["X", "X"]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcdX"), ["X", "X"]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("YXabcd"), ["YX", null]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("aYXbcd"), ["YX", null]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abYXcd"), ["YX", null]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcYXd"), ["YX", null]);
+ shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcdYX"), ["YX", null]);
}

Powered by Google App Engine
This is Rietveld 408576698