| 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 |
| 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 tdiv_test; | 5 library tdiv_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'package:expect/expect.dart'; | |
| 9 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
| 10 import 'compiler_helper.dart'; | 9 import 'compiler_helper.dart'; |
| 11 | 10 |
| 12 const String TEST1 = r""" | 11 const String TEST1 = r""" |
| 13 foo(param) { | 12 foo(param) { |
| 14 var a = param ? 0xFFFFFFFF : 1; | 13 var a = param ? 0xFFFFFFFF : 1; |
| 15 return a ~/ 2; | 14 return a ~/ 2; |
| 16 // Above can be compiled to division followed by truncate. | 15 // Above can be compiled to division followed by truncate. |
| 17 // present: ' / 2 | 0' | 16 // present: ' / 2 | 0' |
| 18 // absent: 'tdiv' | 17 // absent: 'tdiv' |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 66 } |
| 68 | 67 |
| 69 asyncTest(() => Future.wait([ | 68 asyncTest(() => Future.wait([ |
| 70 check(TEST1), | 69 check(TEST1), |
| 71 check(TEST2), | 70 check(TEST2), |
| 72 check(TEST3), | 71 check(TEST3), |
| 73 check(TEST4), | 72 check(TEST4), |
| 74 check(TEST5), | 73 check(TEST5), |
| 75 ])); | 74 ])); |
| 76 } | 75 } |
| OLD | NEW |