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

Unified Diff: tests/corelib_strong/regexp/alternatives_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/alternatives_test.dart
diff --git a/tests/corelib_strong/regexp/alternatives_test.dart b/tests/corelib_strong/regexp/alternatives_test.dart
index 9d2cc4a04f7004173a9afc43c3ec080cc2d3929e..2211dfb03b43ddcf2da1b285f651c4016706c97b 100644
--- a/tests/corelib_strong/regexp/alternatives_test.dart
+++ b/tests/corelib_strong/regexp/alternatives_test.dart
@@ -26,23 +26,27 @@ import 'v8_regexp_utils.dart';
import 'package:expect/expect.dart';
void main() {
- description(
- 'Test regular expression processing with alternatives.'
- );
+ description('Test regular expression processing with alternatives.');
var s1 = "<p>content</p>";
- shouldBe(firstMatch(s1, new RegExp(r"<((\\/([^>]+)>)|(([^>]+)>))")), ["<p>","p>",null,null,"p>","p"]);
- shouldBe(firstMatch(s1, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|(([^>]+)>))")), ["<p>","p>",null,null,null,"p>","p"]);
- shouldBe(firstMatch(s1, new RegExp(r"<(a|\\/p|.+?)>")), ["<p>","p"]);
+ shouldBe(firstMatch(s1, new RegExp(r"<((\\/([^>]+)>)|(([^>]+)>))")),
+ ["<p>", "p>", null, null, "p>", "p"]);
+ shouldBe(firstMatch(s1, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|(([^>]+)>))")),
+ ["<p>", "p>", null, null, null, "p>", "p"]);
+ shouldBe(firstMatch(s1, new RegExp(r"<(a|\\/p|.+?)>")), ["<p>", "p"]);
// Force YARR to use Interpreter by using iterative parentheses
- shouldBe(firstMatch(s1, new RegExp(r"<((\\/([^>]+)>)|((([^>])+)>))")), ["<p>","p>",null,null,"p>","p","p"]);
- shouldBe(firstMatch(s1, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|((([^>])+)>))")), ["<p>","p>",null,null,null,"p>","p","p"]);
- shouldBe(firstMatch(s1, new RegExp(r"<(a|\\/p|(.)+?)>")), ["<p>","p","p"]);
+ shouldBe(firstMatch(s1, new RegExp(r"<((\\/([^>]+)>)|((([^>])+)>))")),
+ ["<p>", "p>", null, null, "p>", "p", "p"]);
+ shouldBe(firstMatch(s1, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|((([^>])+)>))")),
+ ["<p>", "p>", null, null, null, "p>", "p", "p"]);
+ shouldBe(firstMatch(s1, new RegExp(r"<(a|\\/p|(.)+?)>")), ["<p>", "p", "p"]);
// Force YARR to use Interpreter by using backreference
var s2 = "<p>p</p>";
- shouldBe(firstMatch(s2, new RegExp(r"<((\\/([^>]+)>)|(([^>]+)>))\5")), ["<p>p","p>",null,null,"p>","p"]);
- shouldBe(firstMatch(s2, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|(([^>]+)>))\6")), ["<p>p","p>",null,null,null,"p>","p"]);
- shouldBe(firstMatch(s2, new RegExp(r"<(a|\\/p|.+?)>\1")), ["<p>p","p"]);
+ shouldBe(firstMatch(s2, new RegExp(r"<((\\/([^>]+)>)|(([^>]+)>))\5")),
+ ["<p>p", "p>", null, null, "p>", "p"]);
+ shouldBe(firstMatch(s2, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|(([^>]+)>))\6")),
+ ["<p>p", "p>", null, null, null, "p>", "p"]);
+ shouldBe(firstMatch(s2, new RegExp(r"<(a|\\/p|.+?)>\1")), ["<p>p", "p"]);
}

Powered by Google App Engine
This is Rietveld 408576698