Chromium Code Reviews| 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)); |
| + }); |
| +} |