| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 engine.non_error_resolver_test; | 5 library engine.non_error_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 3701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3712 !true; | 3712 !true; |
| 3713 !false; | 3713 !false; |
| 3714 !pb; | 3714 !pb; |
| 3715 !pd; | 3715 !pd; |
| 3716 }'''); | 3716 }'''); |
| 3717 computeLibrarySourceErrors(source); | 3717 computeLibrarySourceErrors(source); |
| 3718 assertNoErrors(source); | 3718 assertNoErrors(source); |
| 3719 verify([source]); | 3719 verify([source]); |
| 3720 } | 3720 } |
| 3721 | 3721 |
| 3722 void test_nonBoolNegationExpression_dynamic() { |
| 3723 Source source = addSource(r''' |
| 3724 f1(bool dynamic) { |
| 3725 !dynamic; |
| 3726 } |
| 3727 f2() { |
| 3728 bool dynamic = true; |
| 3729 !dynamic; |
| 3730 } |
| 3731 '''); |
| 3732 computeLibrarySourceErrors(source); |
| 3733 assertNoErrors(source); |
| 3734 verify([source]); |
| 3735 } |
| 3736 |
| 3722 void test_nonBoolOperand_and_bool() { | 3737 void test_nonBoolOperand_and_bool() { |
| 3723 Source source = addSource(r''' | 3738 Source source = addSource(r''' |
| 3724 bool f(bool left, bool right) { | 3739 bool f(bool left, bool right) { |
| 3725 return left && right; | 3740 return left && right; |
| 3726 }'''); | 3741 }'''); |
| 3727 computeLibrarySourceErrors(source); | 3742 computeLibrarySourceErrors(source); |
| 3728 assertNoErrors(source); | 3743 assertNoErrors(source); |
| 3729 verify([source]); | 3744 verify([source]); |
| 3730 } | 3745 } |
| 3731 | 3746 |
| (...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5830 reset(); | 5845 reset(); |
| 5831 } | 5846 } |
| 5832 | 5847 |
| 5833 void _check_wrongNumberOfParametersForOperator1(String name) { | 5848 void _check_wrongNumberOfParametersForOperator1(String name) { |
| 5834 _check_wrongNumberOfParametersForOperator(name, "a"); | 5849 _check_wrongNumberOfParametersForOperator(name, "a"); |
| 5835 } | 5850 } |
| 5836 | 5851 |
| 5837 CompilationUnit _getResolvedLibraryUnit(Source source) => | 5852 CompilationUnit _getResolvedLibraryUnit(Source source) => |
| 5838 analysisContext.getResolvedCompilationUnit2(source, source); | 5853 analysisContext.getResolvedCompilationUnit2(source, source); |
| 5839 } | 5854 } |
| OLD | NEW |