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

Unified Diff: tests/corelib/collection_length_test.dart

Issue 15263004: Adding isNotEmpty property to collection and string. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix template generation Created 7 years, 7 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 | « sdk/lib/typed_data/dart2js/typed_data_dart2js.dart ('k') | tests/corelib/core_runtime_types_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/collection_length_test.dart
diff --git a/tests/corelib/collection_length_test.dart b/tests/corelib/collection_length_test.dart
index 01a8061d94d02b4469783411e618a8431bf0ff93..3259ab258ae7cd737f725f9602c212e51e2e8047 100644
--- a/tests/corelib/collection_length_test.dart
+++ b/tests/corelib/collection_length_test.dart
@@ -52,12 +52,13 @@ void testList(List list, n) {
void testLength(var lengthable, int size) {
print(lengthable.runtimeType); // Show what hangs the test.
int length = 0;
- // If length or isEmpty is not a constant-time (or very fast) operation,
- // this will timeout.
+ // If length, isEmpty or isNotEmpty is not a constant-time (or very fast)
+ // operation, this will timeout.
for (int i = 0; i < 100000; i++) {
if (!lengthable.isEmpty) length += lengthable.length;
+ if (lengthable.isNotEmpty) length += lengthable.length;
}
- if (length != size * 100000) throw "Bad length: $length / size: $size";
+ if (length != size * 200000) throw "Bad length: $length / size: $size";
}
« no previous file with comments | « sdk/lib/typed_data/dart2js/typed_data_dart2js.dart ('k') | tests/corelib/core_runtime_types_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698