| Index: runtime/tests/vm/dart/byte_array_test.dart
|
| ===================================================================
|
| --- runtime/tests/vm/dart/byte_array_test.dart (revision 21661)
|
| +++ runtime/tests/vm/dart/byte_array_test.dart (working copy)
|
| @@ -991,7 +991,7 @@
|
| for (int i = 0; i < array.length; ++i) {
|
| array[i] = 0xFF - i;
|
| }
|
| - byte_array.setUint32(0, 0xBF800000);
|
| + byte_array.setUint32(0, 0xBF800000, Endianness.LITTLE_ENDIAN);
|
| Expect.equals(0, byte_array.getInt8(0));
|
| Expect.equals(0, byte_array.getInt8(1));
|
| Expect.equals(-128, byte_array.getInt8(2));
|
| @@ -1009,18 +1009,22 @@
|
| Expect.equals(0xF9, byte_array.getUint8(6));
|
| Expect.equals(0xF8, byte_array.getUint8(7));
|
| Expect.equals(0, byte_array.getInt16(0));
|
| - Expect.equals(-16512, byte_array.getInt16(2));
|
| - Expect.equals(-1285, byte_array.getInt16(4));
|
| - Expect.equals(-1799, byte_array.getInt16(6));
|
| - Expect.equals(0x0000, byte_array.getUint16(0));
|
| - Expect.equals(0xBF80, byte_array.getUint16(2));
|
| - Expect.equals(0xFAFB, byte_array.getUint16(4));
|
| - Expect.equals(0xF8F9, byte_array.getUint16(6));
|
| - Expect.equals(-1082130432, byte_array.getInt32(0));
|
| - Expect.equals(0xBF800000, byte_array.getUint32(0));
|
| - Expect.equals(-506097523945897984, byte_array.getInt64(0));
|
| - Expect.equals(0xF8F9FAFBBF800000, byte_array.getUint64(0));
|
| - Expect.equals(-1.0, byte_array.getFloat32(0));
|
| + Expect.equals(-16512, byte_array.getInt16(2, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(-1285, byte_array.getInt16(4, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(-1799, byte_array.getInt16(6, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(0x0000, byte_array.getUint16(0, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(0xBF80, byte_array.getUint16(2, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(0xFAFB, byte_array.getUint16(4, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(0xF8F9, byte_array.getUint16(6, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(-1082130432,
|
| + byte_array.getInt32(0, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(0xBF800000,
|
| + byte_array.getUint32(0, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(-506097523945897984,
|
| + byte_array.getInt64(0, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(0xF8F9FAFBBF800000,
|
| + byte_array.getUint64(0, Endianness.LITTLE_ENDIAN));
|
| + Expect.equals(-1.0, byte_array.getFloat32(0, Endianness.LITTLE_ENDIAN));
|
| // TODO: byte_array.getFloat64(0)
|
| }
|
|
|
|
|