| Index: pkg/analyzer/test/generated/static_warning_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
|
| index 7e8e4f3d4963db1bfa322cf5afb88099301f5c44..f6b6bbfca6bdf926ed38f7bb2bcf0d266f7c6d59 100644
|
| --- a/pkg/analyzer/test/generated/static_warning_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
|
| @@ -2319,6 +2319,24 @@ set g(String v) {}''');
|
| verify([source]);
|
| }
|
|
|
| + void test_missingEnumConstantInSwitch() {
|
| + Source source = addSource(r'''
|
| +enum E { ONE, TWO, THREE, FOUR }
|
| +bool odd(E e) {
|
| + switch (e) {
|
| + case E.ONE:
|
| + case E.THREE: return true;
|
| + }
|
| + return false;
|
| +}''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [
|
| + StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH,
|
| + StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH
|
| + ]);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_mixedReturnTypes_localFunction() {
|
| Source source = addSource(r'''
|
| class C {
|
| @@ -3616,22 +3634,4 @@ class S {
|
| computeLibrarySourceErrors(source);
|
| assertErrors(source, [StaticWarningCode.VOID_RETURN_FOR_GETTER]);
|
| }
|
| -
|
| - void test_missingEnumConstantInSwitch() {
|
| - Source source = addSource(r'''
|
| -enum E { ONE, TWO, THREE, FOUR }
|
| -bool odd(E e) {
|
| - switch (e) {
|
| - case E.ONE:
|
| - case E.THREE: return true;
|
| - }
|
| - return false;
|
| -}''');
|
| - computeLibrarySourceErrors(source);
|
| - assertErrors(source, [
|
| - StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH,
|
| - StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH
|
| - ]);
|
| - verify([source]);
|
| - }
|
| }
|
|
|