OLD | NEW |
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 boolified_operator_test; | 5 library boolified_operator_test; |
| 6 import "package:expect/expect.dart"; |
6 import 'compiler_helper.dart'; | 7 import 'compiler_helper.dart'; |
7 | 8 |
8 const String TEST_EQUAL = r""" | 9 const String TEST_EQUAL = r""" |
9 foo(param0, param1) { | 10 foo(param0, param1) { |
10 if (param0 == param1) return 0; | 11 if (param0 == param1) return 0; |
11 return 1; | 12 return 1; |
12 } | 13 } |
13 """; | 14 """; |
14 | 15 |
15 const String TEST_EQUAL_NULL = r""" | 16 const String TEST_EQUAL_NULL = r""" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 Expect.isTrue(generated.contains('leB')); | 67 Expect.isTrue(generated.contains('leB')); |
67 | 68 |
68 generated = compile(TEST_GREATER, entry: 'foo'); | 69 generated = compile(TEST_GREATER, entry: 'foo'); |
69 Expect.isFalse(generated.contains('=== true')); | 70 Expect.isFalse(generated.contains('=== true')); |
70 Expect.isTrue(generated.contains('gtB')); | 71 Expect.isTrue(generated.contains('gtB')); |
71 | 72 |
72 generated = compile(TEST_GREATER_EQUAL, entry: 'foo'); | 73 generated = compile(TEST_GREATER_EQUAL, entry: 'foo'); |
73 Expect.isFalse(generated.contains('=== true')); | 74 Expect.isFalse(generated.contains('=== true')); |
74 Expect.isTrue(generated.contains('geB')); | 75 Expect.isTrue(generated.contains('geB')); |
75 } | 76 } |
OLD | NEW |