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

Unified Diff: tests/corelib_2/regexp/standalones_test.dart

Issue 2990683003: Readded files that were accidentally removed. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « tests/corelib_2/regexp/stack-overflow_test.dart ('k') | tests/corelib_2/regexp/toString_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib_2/regexp/standalones_test.dart
diff --git a/tests/corelib_strong/regexp/standalones_test.dart b/tests/corelib_2/regexp/standalones_test.dart
similarity index 66%
rename from tests/corelib_strong/regexp/standalones_test.dart
rename to tests/corelib_2/regexp/standalones_test.dart
index bdc048122d9a6890808c1af7164610614347cee6..ffd5c140013fda500c6cfd79260062ec8293da6b 100644
--- a/tests/corelib_strong/regexp/standalones_test.dart
+++ b/tests/corelib_2/regexp/standalones_test.dart
@@ -38,47 +38,47 @@ void main() {
// Tests from ecma_3/RegExp/regress-78156.js
var string = 'aaa\n789\r\nccc\r\n345';
var pattern = new RegExp(r"^\d", multiLine: true);
- var result = pattern.allMatches(string).toList();
- assertEquals(2, result.length, "1");
- assertEquals('7', result[0].group(0), "2");
- assertEquals('3', result[1].group(0), "3");
+ var resultList = pattern.allMatches(string).toList();
+ assertEquals(2, resultList.length, "1");
+ assertEquals('7', resultList[0].group(0), "2");
+ assertEquals('3', resultList[1].group(0), "3");
pattern = new RegExp(r"\d$", multiLine: true);
- result = pattern.allMatches(string).toList();
- assertEquals(2, result.length, "4");
- assertEquals('9', result[0].group(0), "5");
- assertEquals('5', result[1].group(0), "6");
+ resultList = pattern.allMatches(string).toList();
+ assertEquals(2, resultList.length, "4");
+ assertEquals('9', resultList[0].group(0), "5");
+ assertEquals('5', resultList[1].group(0), "6");
string = 'aaa\n789\r\nccc\r\nddd';
pattern = new RegExp(r"^\d", multiLine: true);
- result = pattern.allMatches(string).toList();
- assertEquals(1, result.length, "7");
- assertEquals('7', result[0].group(0), "8");
+ resultList = pattern.allMatches(string).toList();
+ assertEquals(1, resultList.length, "7");
+ assertEquals('7', resultList[0].group(0), "8");
pattern = new RegExp(r"\d$", multiLine: true);
- result = pattern.allMatches(string).toList();
- assertEquals(1, result.length, "9");
- assertEquals('9', result[0].group(0), "10");
+ resultList = pattern.allMatches(string).toList();
+ assertEquals(1, resultList.length, "9");
+ assertEquals('9', resultList[0].group(0), "10");
// Tests from ecma_3/RegExp/regress-72964.js
pattern = new RegExp(r"[\S]+");
string = '\u00BF\u00CD\u00BB\u00A7';
- result = pattern.firstMatch(string);
- assertEquals(1, result.groupCount + 1, "11");
- assertEquals(string, result.group(0), "12");
+ var resultMatch = pattern.firstMatch(string);
+ assertEquals(1, resultMatch.groupCount + 1, "11");
+ assertEquals(string, resultMatch.group(0), "12");
string = '\u00BF\u00CD \u00BB\u00A7';
- result = pattern.firstMatch(string);
- assertEquals(1, result.groupCount + 1, "13");
- assertEquals('\u00BF\u00CD', result.group(0), "14");
+ resultMatch = pattern.firstMatch(string);
+ assertEquals(1, resultMatch.groupCount + 1, "13");
+ assertEquals('\u00BF\u00CD', resultMatch.group(0), "14");
string = '\u4e00\uac00\u4e03\u4e00';
- result = pattern.firstMatch(string);
- assertEquals(1, result.groupCount + 1, "15");
- assertEquals(string, result.group(0), "16");
+ resultMatch = pattern.firstMatch(string);
+ assertEquals(1, resultMatch.groupCount + 1, "15");
+ assertEquals(string, resultMatch.group(0), "16");
string = '\u4e00\uac00 \u4e03\u4e00';
- result = pattern.firstMatch(string);
- assertEquals(1, result.groupCount + 1, "17");
- assertEquals('\u4e00\uac00', result.group(0), "18");
+ resultMatch = pattern.firstMatch(string);
+ assertEquals(1, resultMatch.groupCount + 1, "17");
+ assertEquals('\u4e00\uac00', resultMatch.group(0), "18");
}
« no previous file with comments | « tests/corelib_2/regexp/stack-overflow_test.dart ('k') | tests/corelib_2/regexp/toString_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698