Chromium Code Reviews| Index: tests/standalone/typed_data_test.dart |
| diff --git a/tests/standalone/typed_data_test.dart b/tests/standalone/typed_data_test.dart |
| index 669bee077943103f626834dceda6663ca08b1506..f73c5aff8aef818d4cb3c4f2e94e7bcf310ee007 100644 |
| --- a/tests/standalone/typed_data_test.dart |
| +++ b/tests/standalone/typed_data_test.dart |
| @@ -303,7 +303,8 @@ void testSetAtIndex(TypedData list, |
| testViewCreation() { |
| var bytes = new Uint8List(1024).buffer; |
| - var view = new ByteData.view(bytes, 24); |
| + var view; |
| + view = new ByteData.view(bytes, 24); |
|
Søren Gjesse
2014/07/02 13:06:14
Please add tests passing the length optional argum
|
| Expect.equals(1000, view.lengthInBytes); |
| view = new Uint8List.view(bytes, 24); |
| Expect.equals(1000, view.lengthInBytes); |
| @@ -327,6 +328,31 @@ testViewCreation() { |
| Expect.equals(1000, view.lengthInBytes); |
| view = new Float64List.view(bytes, 24); |
| Expect.equals(1000, view.lengthInBytes); |
| + |
| + view = bytes.asByteData(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asUint8List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asInt8List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asUint8ClampedList(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asUint16List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asInt16List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asUint32List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asInt32List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asUint64List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asInt64List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asFloat32List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| + view = bytes.asFloat64List(24); |
| + Expect.equals(1000, view.lengthInBytes); |
| } |
| testWhere() { |