| 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 eb6aa8bbd76b4c0c614b81ffc36050f4dcc7ce11..02c44b83acb0eecabfa9906b4e9d439532663205 100644
|
| --- a/pkg/analyzer/test/generated/static_warning_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
|
| @@ -3616,4 +3616,22 @@ 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]);
|
| + }
|
| }
|
|
|