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

Unified Diff: tests/html/typed_arrays_dataview_test.dart

Issue 10548065: Revert "Fix DataView constructor and byte accessors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/typed_arrays_dataview_test.dart
diff --git a/tests/html/typed_arrays_dataview_test.dart b/tests/html/typed_arrays_dataview_test.dart
deleted file mode 100644
index c1c641c9f4bda878672510cf9beb24d7650cfca3..0000000000000000000000000000000000000000
--- a/tests/html/typed_arrays_dataview_test.dart
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#library('typed_arrays_dataview_test');
-#import('../../lib/unittest/unittest.dart');
-#import('../../lib/unittest/html_config.dart');
-#import('dart:html');
-
-main() {
- useHtmlConfiguration();
-
- test('access8', () {
- var a1 = new Uint8Array.fromList([0,0,3,255,0,0,0,0,0,0]);
-
- var dv = new DataView(a1.buffer, 2, 6);
-
- expect(dv.getInt8(0), equals(3));
- expect(dv.getInt8(1), equals(-1));
- expect(dv.getUint8(0), equals(3));
- expect(dv.getUint8(1), equals(255));
-
- dv.setInt8(2, -56);
- expect(dv.getInt8(2), equals(-56));
- expect(dv.getUint8(2), equals(200));
-
- dv.setUint8(3, 200);
- expect(dv.getInt8(3), equals(-56));
- expect(dv.getUint8(3), equals(200));
- });
-
- test('access16', () {
- var a1 = new Uint8Array.fromList([0,0,3,255,0,0,0,0,0,0]);
-
- var dv = new DataView(a1.buffer, 2);
-
- expect(dv.byteLength, equals(10 - 2));
-
- expect(dv.getInt16(0), equals(1023));
- expect(dv.getInt16(0, false), equals(1023));
- expect(dv.getInt16(0, littleEndian: false), equals(1023));
- expect(dv.getInt16(0, true), equals(-253));
- expect(dv.getInt16(0, littleEndian: true), equals(-253));
-
- expect(dv.getUint16(0), equals(1023));
- expect(dv.getUint16(0, littleEndian: false), equals(1023));
- expect(dv.getUint16(0, littleEndian: true), equals(0xFF03));
-
- dv.setInt16(2, -1);
- expect(dv.getInt16(2), equals(-1));
- expect(dv.getUint16(2), equals(0xFFFF));
- });
-
- test('access32', () {
- var a1 = new Uint8Array.fromList([0,0,3,255,0,0,0,0,0,0]);
-
- var dv = new DataView(a1.buffer);
-
- expect(dv.getInt32(0), equals(1023));
- expect(dv.getInt32(0, false), equals(1023));
- expect(dv.getInt32(0, littleEndian: false), equals(1023));
- expect(dv.getInt32(0, true), equals(-0xFD0000));
- expect(dv.getInt32(0, littleEndian: true), equals(-0xFD0000));
-
- expect(dv.getUint32(0), equals(1023));
- expect(dv.getUint32(0, littleEndian: false), equals(1023));
- expect(dv.getUint32(0, littleEndian: true), equals(0xFF030000));
- });
-
-}
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698