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"]); |
} |