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

Side by Side Diff: tests/standalone/typed_array_test.dart

Issue 12313088: First step towards implementing dart:typeddata library. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Dart test program for testing native float arrays. 5 // Dart test program for testing native float arrays.
6 6
7 // Library tag to be able to run in html test framework. 7 // Library tag to be able to run in html test framework.
8 library TypedArray; 8 library TypedArray;
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:scalarlist'; 10 import 'dart:typeddata';
11 11
12 void main() { 12 void main() {
13 int8_receiver(); 13 int8_receiver();
14 uint8_receiver(); 14 uint8_receiver();
15 int16_receiver(); 15 int16_receiver();
16 uint16_receiver(); 16 uint16_receiver();
17 int32_receiver(); 17 int32_receiver();
18 uint32_receiver(); 18 uint32_receiver();
19 int64_receiver(); 19 int64_receiver();
20 uint64_receiver(); 20 uint64_receiver();
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 float64_sender() { 333 float64_sender() {
334 port.receive((len, r) { 334 port.receive((len, r) {
335 Expect.equals(float64.length, len); 335 Expect.equals(float64.length, len);
336 var a = new Float64List(len); 336 var a = new Float64List(len);
337 for (int i = 0; i < len; i++) { 337 for (int i = 0; i < len; i++) {
338 a[i] = float64[i]; 338 a[i] = float64[i];
339 } 339 }
340 r.send(a); 340 r.send(a);
341 }); 341 });
342 } 342 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698