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

Unified Diff: pkg/analysis_server/test/analysis/notification_occurrences_test.dart

Issue 668763002: Issue 21238. Fix for NPE in occurrences computer when FieldFormalParameterElement references unreso… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/computer/computer_occurrences.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/analysis/notification_occurrences_test.dart
diff --git a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
index 34fcac71b031256b91031392da919f220dd5ece8..7daf84dbedfb07331ef8c0f404bb91b2c3728df1 100644
--- a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
@@ -136,6 +136,16 @@ class A {
});
}
+ test_field_unresolved() {
+ addTestFile('''
+class A {
+ A(this.noSuchField);
+}
+''');
+ // no checks for occurrences, just ensure that there is no NPE
+ return prepareOccurrences();
+ }
+
test_localVariable() {
addTestFile('''
main() {
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_occurrences.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698