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

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

Issue 11032011: Intrinsify Float32Array_setIndexed on IA32 and X64 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix register usage. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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("FloatArrayTest.dart"); 8 #library("FloatArrayTest.dart");
9 9
10 #import('dart:scalarlist'); 10 #import('dart:scalarlist');
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 Expect.equals(20, floatArray[0]); 43 Expect.equals(20, floatArray[0]);
44 Expect.equals(8, floatArray[1]); 44 Expect.equals(8, floatArray[1]);
45 Expect.equals(9, floatArray[2]); 45 Expect.equals(9, floatArray[2]);
46 } 46 }
47 47
48 void testIndexOutOfRange() { 48 void testIndexOutOfRange() {
49 Float32List floatArray = new Float32List(3); 49 Float32List floatArray = new Float32List(3);
50 List<num> list = const [0.0, 1.0, 2.0, 3.0]; 50 List<num> list = const [0.0, 1.0, 2.0, 3.0];
51 51
52 Expect.throws(() { 52 Expect.throws(() {
53 floatArray[5] = 2.0;
54 });
55 Expect.throws(() {
53 floatArray.setRange(0, 4, list); 56 floatArray.setRange(0, 4, list);
54 }); 57 });
55 58
56 Expect.throws(() { 59 Expect.throws(() {
57 floatArray.setRange(3, 1, list); 60 floatArray.setRange(3, 1, list);
58 }); 61 });
59 } 62 }
60 63
61 void testIndexOf() { 64 void testIndexOf() {
62 var list = new Float32List(10); 65 var list = new Float32List(10);
(...skipping 16 matching lines...) Expand all
79 } 82 }
80 83
81 main() { 84 main() {
82 for (int i = 0; i < 2000; i++) { 85 for (int i = 0; i < 2000; i++) {
83 testCreateFloatArray(); 86 testCreateFloatArray();
84 testSetRange(); 87 testSetRange();
85 testIndexOutOfRange(); 88 testIndexOutOfRange();
86 testIndexOf(); 89 testIndexOf();
87 } 90 }
88 } 91 }
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698