| Index: tests/compiler/dart2js/inverse_operator_test.dart
|
| diff --git a/tests/language/infinity_test.dart b/tests/compiler/dart2js/inverse_operator_test.dart
|
| similarity index 51%
|
| copy from tests/language/infinity_test.dart
|
| copy to tests/compiler/dart2js/inverse_operator_test.dart
|
| index 7ac9f31ad0b9bf555adadd61800eb8b8f93df683..df3da803c0b9c6848fec1968e8aaa6a45a29095d 100644
|
| --- a/tests/language/infinity_test.dart
|
| +++ b/tests/compiler/dart2js/inverse_operator_test.dart
|
| @@ -2,14 +2,20 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| +#import("compiler_helper.dart");
|
| +
|
| +const String MAIN = r"""
|
| int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
|
| +main() {
|
| + var x = 1;
|
| + if (inscrutable(x) == 0) {
|
| + x = 2;
|
| + }
|
| + print(!(1 < x));
|
| +}""";
|
|
|
| main() {
|
| - var things = [0, double.INFINITY, double.NEGATIVE_INFINITY];
|
| - var first = things[1];
|
| - var second = things[2];
|
| - Expect.isFalse(first is int);
|
| - Expect.isFalse(second is int);
|
| - Expect.isTrue(first is double);
|
| - Expect.isTrue(second is double);
|
| + // Make sure we don't introduce a new variable.
|
| + RegExp regexp = new RegExp("1 >= x");
|
| + compileAndMatch(MAIN, 'main', regexp);
|
| }
|
|
|