| 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 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2590 void test_misMatchedGetterAndSetterTypes_topLevel_unspecifiedSetter() { | 2590 void test_misMatchedGetterAndSetterTypes_topLevel_unspecifiedSetter() { |
| 2591 Source source = addSource(r''' | 2591 Source source = addSource(r''' |
| 2592 int get x => 0; | 2592 int get x => 0; |
| 2593 set x(v) {}'''); | 2593 set x(v) {}'''); |
| 2594 resolve(source); | 2594 resolve(source); |
| 2595 assertNoErrors(source); | 2595 assertNoErrors(source); |
| 2596 verify([source]); | 2596 verify([source]); |
| 2597 } | 2597 } |
| 2598 | 2598 |
| 2599 void test_missingEnumConstantInSwitch_all() { | 2599 void test_missingEnumConstantInSwitch_all() { |
| 2600 AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl(); | 2600 resetWithEnum(); |
| 2601 analysisOptions.enableEnum = true; | |
| 2602 resetWithOptions(analysisOptions); | |
| 2603 Source source = addSource(r''' | 2601 Source source = addSource(r''' |
| 2604 enum E { A, B, C } | 2602 enum E { A, B, C } |
| 2605 | 2603 |
| 2606 f(E e) { | 2604 f(E e) { |
| 2607 switch (e) { | 2605 switch (e) { |
| 2608 case E.A: break; | 2606 case E.A: break; |
| 2609 case E.B: break; | 2607 case E.B: break; |
| 2610 case E.C: break; | 2608 case E.C: break; |
| 2611 } | 2609 } |
| 2612 }'''); | 2610 }'''); |
| 2613 resolve(source); | 2611 resolve(source); |
| 2614 assertNoErrors(source); | 2612 assertNoErrors(source); |
| 2615 verify([source]); | 2613 verify([source]); |
| 2616 } | 2614 } |
| 2617 | 2615 |
| 2618 void test_missingEnumConstantInSwitch_default() { | 2616 void test_missingEnumConstantInSwitch_default() { |
| 2619 AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl(); | 2617 resetWithEnum(); |
| 2620 analysisOptions.enableEnum = true; | |
| 2621 resetWithOptions(analysisOptions); | |
| 2622 Source source = addSource(r''' | 2618 Source source = addSource(r''' |
| 2623 enum E { A, B, C } | 2619 enum E { A, B, C } |
| 2624 | 2620 |
| 2625 f(E e) { | 2621 f(E e) { |
| 2626 switch (e) { | 2622 switch (e) { |
| 2627 case E.B: break; | 2623 case E.B: break; |
| 2628 default: break; | 2624 default: break; |
| 2629 } | 2625 } |
| 2630 }'''); | 2626 }'''); |
| 2631 resolve(source); | 2627 resolve(source); |
| (...skipping 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4797 resolve(source); | 4793 resolve(source); |
| 4798 assertNoErrors(source); | 4794 assertNoErrors(source); |
| 4799 verify([source]); | 4795 verify([source]); |
| 4800 reset(); | 4796 reset(); |
| 4801 } | 4797 } |
| 4802 | 4798 |
| 4803 void _check_wrongNumberOfParametersForOperator1(String name) { | 4799 void _check_wrongNumberOfParametersForOperator1(String name) { |
| 4804 _check_wrongNumberOfParametersForOperator(name, "a"); | 4800 _check_wrongNumberOfParametersForOperator(name, "a"); |
| 4805 } | 4801 } |
| 4806 } | 4802 } |
| OLD | NEW |