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

Unified Diff: pkg/analysis_server/test/edit/fixes_test.dart

Issue 556573002: Make SdkLibrary.shortName consistently include 'dart:' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/analysis_server/test/edit/fixes_test.dart
diff --git a/pkg/analysis_server/test/edit/fixes_test.dart b/pkg/analysis_server/test/edit/fixes_test.dart
index 58f4b540ed999300e67651d8cdd726e7bce63164..2d2f1c085aa3e90ee9f38d2bc24124428c0f6ad2 100644
--- a/pkg/analysis_server/test/edit/fixes_test.dart
+++ b/pkg/analysis_server/test/edit/fixes_test.dart
@@ -29,6 +29,25 @@ class FixesTest extends AbstractAnalysisTest {
handler = new EditDomainHandler(server);
}
+ Future test_fixUndefinedClass() {
+ addTestFile('''
+main() {
+ Future<String> x = null;
+}
+''');
+ return waitForTasksFinished().then((_) {
+ List<AnalysisErrorFixes> errorFixes = _getFixesAt('Future<String>');
+ expect(errorFixes, hasLength(1));
+ AnalysisError error = errorFixes[0].error;
+ expect(error.severity, AnalysisErrorSeverity.WARNING);
+ expect(error.type, AnalysisErrorType.STATIC_WARNING);
+ List<SourceChange> fixes = errorFixes[0].fixes;
+ expect(fixes, hasLength(2));
+ expect(fixes[0].message, matches('Import library'));
+ expect(fixes[1].message, matches('Create class'));
+ });
+ }
+
Future test_hasFixes() {
addTestFile('''
foo() {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | pkg/analysis_server/test/mock_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698