| 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 #library('typed_arrays_dataview_test'); | 5 #library('typed_arrays_dataview_test'); |
| 6 #import('../../pkg/unittest/unittest.dart'); | 6 #import('../../pkg/unittest/lib/unittest.dart'); |
| 7 #import('../../pkg/unittest/html_config.dart'); | 7 #import('../../pkg/unittest/lib/html_config.dart'); |
| 8 #import('dart:html'); | 8 #import('dart:html'); |
| 9 | 9 |
| 10 main() { | 10 main() { |
| 11 useHtmlConfiguration(); | 11 useHtmlConfiguration(); |
| 12 | 12 |
| 13 test('access8', () { | 13 test('access8', () { |
| 14 var a1 = new Uint8Array.fromList([0,0,3,255,0,0,0,0,0,0]); | 14 var a1 = new Uint8Array.fromList([0,0,3,255,0,0,0,0,0,0]); |
| 15 | 15 |
| 16 var dv = new DataView(a1.buffer, 2, 6); | 16 var dv = new DataView(a1.buffer, 2, 6); |
| 17 | 17 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 expect(dv.getInt32(0, littleEndian: false), equals(1023)); | 61 expect(dv.getInt32(0, littleEndian: false), equals(1023)); |
| 62 expect(dv.getInt32(0, true), equals(-0xFD0000)); | 62 expect(dv.getInt32(0, true), equals(-0xFD0000)); |
| 63 expect(dv.getInt32(0, littleEndian: true), equals(-0xFD0000)); | 63 expect(dv.getInt32(0, littleEndian: true), equals(-0xFD0000)); |
| 64 | 64 |
| 65 expect(dv.getUint32(0), equals(1023)); | 65 expect(dv.getUint32(0), equals(1023)); |
| 66 expect(dv.getUint32(0, littleEndian: false), equals(1023)); | 66 expect(dv.getUint32(0, littleEndian: false), equals(1023)); |
| 67 expect(dv.getUint32(0, littleEndian: true), equals(0xFF030000)); | 67 expect(dv.getUint32(0, littleEndian: true), equals(0xFF030000)); |
| 68 }); | 68 }); |
| 69 | 69 |
| 70 } | 70 } |
| OLD | NEW |