| OLD | NEW |
| 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 byte arrays. | 5 // Dart test program for testing native byte 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("ByteArrayTest.dart"); | 8 library ByteArrayTest; |
| 9 | 9 |
| 10 #import('dart:scalarlist'); | 10 import 'dart:scalarlist'; |
| 11 | 11 |
| 12 void testCreateUint8ByteArray() { | 12 void testCreateUint8ByteArray() { |
| 13 Uint8List byteArray; | 13 Uint8List byteArray; |
| 14 | 14 |
| 15 byteArray = new Uint8List(0); | 15 byteArray = new Uint8List(0); |
| 16 Expect.isTrue(byteArray is Uint8List); | 16 Expect.isTrue(byteArray is Uint8List); |
| 17 Expect.isFalse(byteArray is Uint8ClampedList); | 17 Expect.isFalse(byteArray is Uint8ClampedList); |
| 18 Expect.equals(0, byteArray.length); | 18 Expect.equals(0, byteArray.length); |
| 19 | 19 |
| 20 byteArray = new Uint8List(10); | 20 byteArray = new Uint8List(10); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 testClampedUnsignedByteArrayRange(false); | 218 testClampedUnsignedByteArrayRange(false); |
| 219 testSetRange(); | 219 testSetRange(); |
| 220 testIndexOutOfRange(); | 220 testIndexOutOfRange(); |
| 221 testIndexOf(); | 221 testIndexOf(); |
| 222 testSubArray(); | 222 testSubArray(); |
| 223 } | 223 } |
| 224 testByteArrayRange(true); | 224 testByteArrayRange(true); |
| 225 testUnsignedByteArrayRange(true); | 225 testUnsignedByteArrayRange(true); |
| 226 } | 226 } |
| 227 | 227 |
| OLD | NEW |