OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
zra
2015/10/29 21:16:13
It looks like this test will fail if we ever try t
| |
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 // Test a new statement by itself. | 4 // Test a new statement by itself. |
5 // VMOptions=--optimization-counter-threshold=4 --no-use-osr | 5 // VMOptions=--optimization-counter-threshold=4 |
6 | 6 |
7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
8 | 8 |
9 import "package:expect/expect.dart"; | 9 import "package:expect/expect.dart"; |
10 | 10 |
11 double uint64toDouble(int i) { | 11 double uint64toDouble(int i) { |
12 var buffer = new Uint8List(8).buffer; | 12 var buffer = new Uint8List(8).buffer; |
13 var bdata = new ByteData.view(buffer); | 13 var bdata = new ByteData.view(buffer); |
14 bdata.setUint64(0, i); | 14 bdata.setUint64(0, i); |
15 return bdata.getFloat64(0); | 15 return bdata.getFloat64(0); |
(...skipping 25 matching lines...) Expand all Loading... | |
41 Expect.isFalse(checkIdentical(a, b)); | 41 Expect.isFalse(checkIdentical(a, b)); |
42 Expect.isFalse(checkIdentical(-a, -b)); | 42 Expect.isFalse(checkIdentical(-a, -b)); |
43 Expect.isFalse(checkIdentical(-a, b)); | 43 Expect.isFalse(checkIdentical(-a, b)); |
44 Expect.isFalse(checkIdentical(a, -b)); | 44 Expect.isFalse(checkIdentical(a, -b)); |
45 | 45 |
46 Expect.isTrue(checkIdentical(-(-a), a)); | 46 Expect.isTrue(checkIdentical(-(-a), a)); |
47 Expect.isTrue(checkIdentical(-(-b), b)); | 47 Expect.isTrue(checkIdentical(-(-b), b)); |
48 } | 48 } |
49 } | 49 } |
50 | 50 |
51 checkIdentical(a, b) => identical(a, b); | 51 checkIdentical(a, b) => identical(a, b); |
OLD | NEW |