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

Unified Diff: tests/html/typed_arrays_dataview_test.dart

Issue 11234062: Make endianness named argument for DataView accessors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « lib/html/scripts/generator.py ('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
index 08029d8b68323ddc01adf5b36139bd7b0abd7968..2a486f0f50ec4cdf669e842f70192de38f92e415 100644
--- a/tests/html/typed_arrays_dataview_test.dart
+++ b/tests/html/typed_arrays_dataview_test.dart
@@ -37,18 +37,12 @@ main() {
expect(dv.byteLength, equals(10 - 2));
expect(dv.getInt16(0), equals(1023));
- expect(dv.getInt16(0, false), equals(1023));
- // OPTIONALS expect(dv.getInt16(0, littleEndian: false), equals(1023));
- expect(dv.getInt16(0, false), equals(1023));
Anton Muhin 2012/10/23 19:17:37 yes, it's mandatory now. On one hand I find it wa
blois 2012/10/23 19:37:28 Seems acceptable to require that this be spelled o
Emily Fortuna 2012/10/23 20:33:34 I agree with Pete. Better to have it explicitly th
- expect(dv.getInt16(0, true), equals(-253));
- // OPTIONALS expect(dv.getInt16(0, littleEndian: true), equals(-253));
- expect(dv.getInt16(0, true), equals(-253));
+ expect(dv.getInt16(0, littleEndian: false), equals(1023));
+ expect(dv.getInt16(0, littleEndian: true), equals(-253));
expect(dv.getUint16(0), equals(1023));
- // OPTIONALS expect(dv.getUint16(0, littleEndian: false), equals(1023));
- expect(dv.getUint16(0, false), equals(1023));
- // OPTIONALS expect(dv.getUint16(0, littleEndian: true), equals(0xFF03));
- expect(dv.getUint16(0, true), equals(0xFF03));
+ 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));
@@ -61,18 +55,12 @@ main() {
var dv = new DataView(a1.buffer);
expect(dv.getInt32(0), equals(1023));
- expect(dv.getInt32(0, false), equals(1023));
- // OPTIONALS expect(dv.getInt32(0, littleEndian: false), equals(1023));
- expect(dv.getInt32(0, false), equals(1023));
- expect(dv.getInt32(0, true), equals(-0xFD0000));
- // OPTIONALS expect(dv.getInt32(0, littleEndian: true), equals(-0xFD0000));
- expect(dv.getInt32(0, true), equals(-0xFD0000));
+ expect(dv.getInt32(0, littleEndian: false), equals(1023));
+ expect(dv.getInt32(0, littleEndian: true), equals(-0xFD0000));
expect(dv.getUint32(0), equals(1023));
- // OPTIONALS expect(dv.getUint32(0, littleEndian: false), equals(1023));
- expect(dv.getUint32(0, false), equals(1023));
- // OPTIONALS expect(dv.getUint32(0, littleEndian: true), equals(0xFF030000));
- expect(dv.getUint32(0, true), equals(0xFF030000));
+ expect(dv.getUint32(0, littleEndian: false), equals(1023));
+ expect(dv.getUint32(0, littleEndian: true), equals(0xFF030000));
});
}
« no previous file with comments | « lib/html/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698