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

Unified Diff: tests/corelib/string_pattern_test.dart

Issue 11230011: Make hasNext a getter instead of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. Created 8 years, 2 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/set_iterator_test.dart ('k') | tests/standalone/io/http_server_early_client_close_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/string_pattern_test.dart
diff --git a/tests/corelib/string_pattern_test.dart b/tests/corelib/string_pattern_test.dart
index 3fb35337ed0684e21a7efa1d2c508c902d84a293..88fc78c808b1e846c3a23b5cbae1be6945b5726f 100644
--- a/tests/corelib/string_pattern_test.dart
+++ b/tests/corelib/string_pattern_test.dart
@@ -18,7 +18,7 @@ testNoMatch() {
// Also tests that RegExp groups don't work.
String helloPattern = "with (hello)";
Iterable<Match> matches = helloPattern.allMatches(str);
- Expect.isFalse(matches.iterator().hasNext());
+ Expect.isFalse(matches.iterator().hasNext);
}
testOneMatch() {
@@ -26,7 +26,7 @@ testOneMatch() {
Iterable<Match> matches = helloPattern.allMatches(str);
var iterator = matches.iterator();
Match match = iterator.next();
- Expect.isFalse(iterator.hasNext());
+ Expect.isFalse(iterator.hasNext);
Expect.equals(str.indexOf('with', 0), match.start());
Expect.equals(str.indexOf('with', 0) + helloPattern.length, match.end());
Expect.equals(helloPattern, match.pattern);
@@ -58,19 +58,19 @@ testTwoMatches() {
testEmptyPattern() {
String pattern = "";
Iterable<Match> matches = pattern.allMatches(str);
- Expect.isTrue(matches.iterator().hasNext());
+ Expect.isTrue(matches.iterator().hasNext);
}
testEmptyString() {
String pattern = "foo";
String str = "";
Iterable<Match> matches = pattern.allMatches(str);
- Expect.isFalse(matches.iterator().hasNext());
+ Expect.isFalse(matches.iterator().hasNext);
}
testEmptyPatternAndString() {
String pattern = "";
String str = "";
Iterable<Match> matches = pattern.allMatches(str);
- Expect.isTrue(matches.iterator().hasNext());
+ Expect.isTrue(matches.iterator().hasNext);
}
« no previous file with comments | « tests/corelib/set_iterator_test.dart ('k') | tests/standalone/io/http_server_early_client_close_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698