OLD | NEW |
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"; |
11 import 'dart:typeddata'; | 11 import 'dart:typed_data'; |
12 | 12 |
13 void testCreateUint8TypedData() { | 13 void testCreateUint8TypedData() { |
14 Uint8List typed_data; | 14 Uint8List typed_data; |
15 | 15 |
16 typed_data = new Uint8List(0); | 16 typed_data = new Uint8List(0); |
17 Expect.isTrue(typed_data is Uint8List); | 17 Expect.isTrue(typed_data is Uint8List); |
18 Expect.isFalse(typed_data is Uint8ClampedList); | 18 Expect.isFalse(typed_data is Uint8ClampedList); |
19 Expect.equals(0, typed_data.length); | 19 Expect.equals(0, typed_data.length); |
20 | 20 |
21 typed_data = new Uint8List(10); | 21 typed_data = new Uint8List(10); |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |