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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 1013303002: Fix for NPE in the field creation Quick Fix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 7406f2f50d553b22ad472e527ec1f52275ed7d3f..6625ff2244dcf83c26f204c7b29f19cbb5f50dce 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -600,6 +600,18 @@ class B extends A {
assertNoFix(FixKind.CREATE_CONSTRUCTOR_SUPER);
}
+ void test_createField_BAD_inEnum() {
+ resolveTestUnit('''
+enum MyEnum {
+ AAA, BBB
+}
+main() {
+ MyEnum.foo;
+}
+''');
+ assertNoFix(FixKind.CREATE_FIELD);
+ }
+
void test_createField_BAD_inSDK() {
resolveTestUnit('''
main(List p) {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698