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

Side by Side Diff: runtime/tests/vm/dart/byte_array_test.dart

Issue 11227042: isEven, isOdd, isNegative, isMaxValue, isMinValue, isInfinite, isPositive, isSingleValue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. 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 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 tag to be able to run in html test framework. 5 // Library tag to be able to run in html test framework.
6 #library("ByteArrayTest.dart"); 6 #library("ByteArrayTest.dart");
7 7
8 #import('dart:scalarlist'); 8 #import('dart:scalarlist');
9 9
10 class ByteArrayTest { 10 class ByteArrayTest {
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 array[i] = 0xFF; 875 array[i] = 0xFF;
876 } 876 }
877 Expect.equals(-1, byte_array.getInt8(0)); 877 Expect.equals(-1, byte_array.getInt8(0));
878 Expect.equals(0xFF, byte_array.getUint8(0)); 878 Expect.equals(0xFF, byte_array.getUint8(0));
879 Expect.equals(-1, byte_array.getInt16(0)); 879 Expect.equals(-1, byte_array.getInt16(0));
880 Expect.equals(0xFFFF, byte_array.getUint16(0)); 880 Expect.equals(0xFFFF, byte_array.getUint16(0));
881 Expect.equals(-1, byte_array.getInt32(0)); 881 Expect.equals(-1, byte_array.getInt32(0));
882 Expect.equals(0xFFFFFFFF, byte_array.getUint32(0)); 882 Expect.equals(0xFFFFFFFF, byte_array.getUint32(0));
883 Expect.equals(-1, byte_array.getInt64(0)); 883 Expect.equals(-1, byte_array.getInt64(0));
884 Expect.equals(0xFFFFFFFFFFFFFFFF, byte_array.getUint64(0)); 884 Expect.equals(0xFFFFFFFFFFFFFFFF, byte_array.getUint64(0));
885 Expect.isTrue(byte_array.getFloat32(0).isNaN()); 885 Expect.isTrue(byte_array.getFloat32(0).isNaN);
886 Expect.isTrue(byte_array.getFloat64(0).isNaN()); 886 Expect.isTrue(byte_array.getFloat64(0).isNaN);
887 for (int i = 0; i < array.length; ++i) { 887 for (int i = 0; i < array.length; ++i) {
888 array[i] = 0xFF - i; 888 array[i] = 0xFF - i;
889 } 889 }
890 byte_array.setUint32(0, 0xBF800000); 890 byte_array.setUint32(0, 0xBF800000);
891 Expect.equals(0, byte_array.getInt8(0)); 891 Expect.equals(0, byte_array.getInt8(0));
892 Expect.equals(0, byte_array.getInt8(1)); 892 Expect.equals(0, byte_array.getInt8(1));
893 Expect.equals(-128, byte_array.getInt8(2)); 893 Expect.equals(-128, byte_array.getInt8(2));
894 Expect.equals(-65, byte_array.getInt8(3)); 894 Expect.equals(-65, byte_array.getInt8(3));
895 Expect.equals(-5, byte_array.getInt8(4)); 895 Expect.equals(-5, byte_array.getInt8(4));
896 Expect.equals(-6, byte_array.getInt8(5)); 896 Expect.equals(-6, byte_array.getInt8(5));
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 testInt64ListView(); 2269 testInt64ListView();
2270 testUint64ListView(); 2270 testUint64ListView();
2271 testFloat32ListView(); 2271 testFloat32ListView();
2272 testFloat64ListView(); 2272 testFloat64ListView();
2273 } 2273 }
2274 } 2274 }
2275 2275
2276 main() { 2276 main() {
2277 ByteArrayTest.testMain(); 2277 ByteArrayTest.testMain();
2278 } 2278 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698