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

Unified Diff: tests/html/typed_arrays_5_test.dart

Issue 11187063: Generate contains() method for list mixin only if not already defined. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/html/queryall_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/typed_arrays_5_test.dart
diff --git a/tests/html/typed_arrays_5_test.dart b/tests/html/typed_arrays_5_test.dart
index daa4ccff0694d7dca3fd3d3a6f9c2e826cfc0c05..a0792aa41ed5e9af33d5bae003b30c5293109cea 100644
--- a/tests/html/typed_arrays_5_test.dart
+++ b/tests/html/typed_arrays_5_test.dart
@@ -27,4 +27,18 @@ main() {
expect(a.filter((x) => x >= 1000).length, equals(24));
});
+
+ test('contains', () {
+ var a = new Int16Array(1024);
+ for (int i = 0; i < a.length; i++) {
+ a[i] = i;
+ }
+ expect(a.contains(0), isTrue);
+ expect(a.contains(5), isTrue);
+ expect(a.contains(1023), isTrue);
+
+ expect(a.contains(-5), isFalse);
+ expect(a.contains(-1), isFalse);
+ expect(a.contains(1024), isFalse);
+ });
}
« no previous file with comments | « tests/html/queryall_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698