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

Side by Side Diff: tests/html/typed_arrays_dataview_test.dart

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
OLDNEW
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
18 expect(dv.getInt8(0), equals(3)); 18 expect(dv.getInt8(0), equals(3));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 expect(dv.getInt32(0), equals(1023)); 57 expect(dv.getInt32(0), equals(1023));
58 expect(dv.getInt32(0, littleEndian: false), equals(1023)); 58 expect(dv.getInt32(0, littleEndian: false), equals(1023));
59 expect(dv.getInt32(0, littleEndian: true), equals(-0xFD0000)); 59 expect(dv.getInt32(0, littleEndian: true), equals(-0xFD0000));
60 60
61 expect(dv.getUint32(0), equals(1023)); 61 expect(dv.getUint32(0), equals(1023));
62 expect(dv.getUint32(0, littleEndian: false), equals(1023)); 62 expect(dv.getUint32(0, littleEndian: false), equals(1023));
63 expect(dv.getUint32(0, littleEndian: true), equals(0xFF030000)); 63 expect(dv.getUint32(0, littleEndian: true), equals(0xFF030000));
64 }); 64 });
65 65
66 } 66 }
OLDNEW
« no previous file with comments | « tests/html/typed_arrays_arraybuffer_test.dart ('k') | tests/html/typed_arrays_range_checks_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698