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

Unified Diff: tests/html/typed_arrays_5_test.dart

Issue 10780029: ArrayBuffer constructor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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/html/html.status ('k') | tests/html/typed_arrays_arraybuffer_test.dart » ('j') | 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
new file mode 100644
index 0000000000000000000000000000000000000000..beae6cde8631f7d09fef82c1260c545204f4075a
--- /dev/null
+++ b/tests/html/typed_arrays_5_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#library('typed_arrays_5_test');
+#import('../../lib/unittest/unittest.dart');
+#import('../../lib/unittest/html_config.dart');
+#import('dart:html');
+
+main() {
+ useHtmlConfiguration();
+
+ test('filter_dynamic', () {
+ var a = new Float32Array(1024);
vsm 2012/07/17 19:55:40 Will this actually generate different code then th
+ for (int i = 0; i < a.length; i++) {
+ a[i] = i;
+ }
+
+ expect(a.filter((x) => x >= 1000).length, equals(24));
+ });
+
+ test('filter_typed', () {
+ Float32Array a = new Float32Array(1024);
+ for (int i = 0; i < a.length; i++) {
+ a[i] = i;
+ }
+
+ expect(a.filter((x) => x >= 1000).length, equals(24));
+ });
+}
« no previous file with comments | « tests/html/html.status ('k') | tests/html/typed_arrays_arraybuffer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698