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

Unified Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 1648923003: Fix an exception caused by malformed code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/analyzer/test/generated/resolver_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/context/context_test.dart
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index d37179a9449a67d5176e8bc41a4b3b93b6cc95b5..326e6a2bc2c4997a095cded8bd581e58f00cf454 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -490,6 +490,13 @@ library lib;
expect(context.computeDocumentationComment(null), isNull);
}
+ void test_computeErrors_dart_malformedCode() {
+ Source source = addSource("/lib.dart", "final int , = 42;");
+ List<AnalysisError> errors = context.computeErrors(source);
+ expect(errors, isNotNull);
+ expect(errors.length > 0, isTrue);
+ }
+
void test_computeErrors_dart_none() {
Source source = addSource("/lib.dart", "library lib;");
List<AnalysisError> errors = context.computeErrors(source);
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698