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

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

Issue 1764853002: Quick fix to ignore a specific error (#25915). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixes Created 4 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
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 fb2ee76a91fd828cd664a55bb6f1727cb60ce000..73cdfeb2df0bf5920a9299b4ac7ddb08533e2201 100644
--- a/pkg/analysis_server/test/edit/fixes_test.dart
+++ b/pkg/analysis_server/test/edit/fixes_test.dart
@@ -9,6 +9,7 @@ import 'dart:async';
import 'package:analysis_server/plugin/protocol/protocol.dart';
import 'package:analysis_server/src/domain_analysis.dart';
import 'package:analysis_server/src/edit/edit_domain.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
import 'package:plugin/manager.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'package:unittest/unittest.dart' hide ERROR;
@@ -37,6 +38,7 @@ class FixesTest extends AbstractAnalysisTest {
addTestFile('''
main() {
Future<String> x = null;
+ print(x);
scheglov 2016/03/04 18:55:20 Why do we need this statement?
pquitslund 2016/03/04 19:09:39 Without it, we get an `unused_local_variable` hint
}
''');
await waitForTasksFinished();
@@ -46,9 +48,11 @@ main() {
expect(error.severity, AnalysisErrorSeverity.WARNING);
expect(error.type, AnalysisErrorType.STATIC_WARNING);
List<SourceChange> fixes = errorFixes[0].fixes;
- expect(fixes, hasLength(2));
+ expect(fixes, hasLength(3));
expect(fixes[0].message, matches('Import library'));
expect(fixes[1].message, matches('Create class'));
+ expect(
+ fixes[2].message, matches("Ignore error with code 'undefined_class'"));
}
test_hasFixes() async {

Powered by Google App Engine
This is Rietveld 408576698