OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'package:async_helper/async_helper.dart'; | 5 import 'package:async_helper/async_helper.dart'; |
6 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
7 | 7 |
8 import 'compiler_helper.dart'; | 8 import 'compiler_helper.dart'; |
9 | 9 |
10 // Test that if (x == y) where we know nothing about x and y will get optimized | 10 // Test that if (x == y) where we know nothing about x and y will get optimized |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 var c = inscrutable(0) == 0 ? a : "kurt"; | 42 var c = inscrutable(0) == 0 ? a : "kurt"; |
43 var d = inscrutable(0) == 0 ? b : "gert"; | 43 var d = inscrutable(0) == 0 ? b : "gert"; |
44 if (c == d) { | 44 if (c == d) { |
45 print("hestfisk"); | 45 print("hestfisk"); |
46 } | 46 } |
47 } | 47 } |
48 """; | 48 """; |
49 | 49 |
50 void main() { | 50 void main() { |
51 asyncTest(() => compileAll(TEST).then((generated) { | 51 asyncTest(() => compileAll(TEST).then((generated) { |
52 if (generated.contains(r'=== true')) { | 52 if (generated.contains(r'=== true')) { |
53 print(generated); | 53 print(generated); |
54 Expect.fail("missing elision of '=== true'"); | 54 Expect.fail("missing elision of '=== true'"); |
55 } | 55 } |
56 })); | 56 })); |
57 } | 57 } |
OLD | NEW |