Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(891)

Unified Diff: pkg/analyzer/test/generated/static_warning_code_test.dart

Issue 1843473002: Sort analyzer sources (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove generated file and fix misplaced comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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]);
- }
}
« no previous file with comments | « pkg/analyzer/test/generated/static_type_warning_code_test.dart ('k') | pkg/analyzer/test/generated/type_system_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698