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

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

Issue 902273002: Don't propose fixes to update SDK sources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 cc230ca9af9892868d6d6c9ff1121bcf51e2440f..232d5602e352af658a1891214df2c0dd843ae714 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -452,6 +452,15 @@ class B extends A {
assertNoFix(FixKind.CREATE_CONSTRUCTOR_SUPER);
}
+ void test_createField_BAD_inSDK() {
+ _indexTestUnit('''
+main(List p) {
+ p.foo = 1;
+}
+''');
+ assertNoFix(FixKind.CREATE_FIELD);
+ }
+
void test_createField_getter_multiLevel() {
_indexTestUnit('''
class A {
@@ -751,6 +760,15 @@ import 'my_file.dart';
expect(fileEdit.edits[0].replacement, contains('library my.file;'));
}
+ void test_createGetter_BAD_inSDK() {
+ _indexTestUnit('''
+main(List p) {
+ int v = p.foo;
+}
+''');
+ assertNoFix(FixKind.CREATE_GETTER);
+ }
+
void test_createGetter_multiLevel() {
_indexTestUnit('''
class A {
@@ -2347,6 +2365,15 @@ main() {
''');
}
+ void test_undefinedMethod_create_BAD_inSDK() {
+ _indexTestUnit('''
+main() {
+ List.foo();
+}
+''');
+ assertNoFix(FixKind.CREATE_METHOD);
+ }
+
void test_undefinedMethod_create_generic_BAD() {
_indexTestUnit('''
class A<T> {
« 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