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

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

Issue 14316008: Changed Uint8ClampedList to implement Uint8List (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebasing Created 7 years, 6 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 | « sdk/lib/typed_data/typed_data.dart ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 typed data. 5 // Dart test program for testing typed data.
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 TypedDataTest; 8 library TypedDataTest;
9 9
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 12 matching lines...) Expand all
23 for (int i = 0; i < 10; i++) { 23 for (int i = 0; i < 10; i++) {
24 Expect.equals(0, typed_data[i]); 24 Expect.equals(0, typed_data[i]);
25 } 25 }
26 } 26 }
27 27
28 void testCreateClampedUint8TypedData() { 28 void testCreateClampedUint8TypedData() {
29 Uint8ClampedList typed_data; 29 Uint8ClampedList typed_data;
30 30
31 typed_data = new Uint8ClampedList(0); 31 typed_data = new Uint8ClampedList(0);
32 Expect.isTrue(typed_data is Uint8ClampedList); 32 Expect.isTrue(typed_data is Uint8ClampedList);
33 Expect.isFalse(typed_data is Uint8List); 33 Expect.isTrue(typed_data is Uint8List);
34 Expect.equals(0, typed_data.length); 34 Expect.equals(0, typed_data.length);
35 Expect.equals(0, typed_data.lengthInBytes); 35 Expect.equals(0, typed_data.lengthInBytes);
36 36
37 typed_data = new Uint8ClampedList(10); 37 typed_data = new Uint8ClampedList(10);
38 Expect.equals(10, typed_data.length); 38 Expect.equals(10, typed_data.length);
39 for (int i = 0; i < 10; i++) { 39 for (int i = 0; i < 10; i++) {
40 Expect.equals(0, typed_data[i]); 40 Expect.equals(0, typed_data[i]);
41 } 41 }
42 } 42 }
43 43
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 testSetAtIndex(float64list, 1.4260258159703532e-105, true); 369 testSetAtIndex(float64list, 1.4260258159703532e-105, true);
370 testGetAtIndex(float64list, 1.4260258159703532e-105); 370 testGetAtIndex(float64list, 1.4260258159703532e-105);
371 } 371 }
372 testTypedDataRange(true); 372 testTypedDataRange(true);
373 testUnsignedTypedDataRange(true); 373 testUnsignedTypedDataRange(true);
374 testViewCreation(); 374 testViewCreation();
375 testWhere(); 375 testWhere();
376 testCreationFromList(); 376 testCreationFromList();
377 } 377 }
378 378
OLDNEW
« no previous file with comments | « sdk/lib/typed_data/typed_data.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698