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

Unified Diff: pkg/analysis_server/test/integration/analysis/occurrences_test.dart

Issue 631553002: Change integration test notifications to use structured objects. (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
Index: pkg/analysis_server/test/integration/analysis/occurrences_test.dart
diff --git a/pkg/analysis_server/test/integration/analysis/occurrences_test.dart b/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
index 781d0d65a63bb09302d228f3d9a8ef35ee976412..413459b274888f27b28ad8a1f9a28b1b49e2784e 100644
--- a/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
@@ -31,17 +31,17 @@ main() {
sendAnalysisSetSubscriptions({
AnalysisService.OCCURRENCES: [pathname]
});
- List occurrences;
- onAnalysisOccurrences.listen((params) {
- expect(params['file'], equals(pathname));
- occurrences = params['occurrences'];
+ List<Occurrences> occurrences;
+ onAnalysisOccurrences.listen((AnalysisOccurrencesParams params) {
+ expect(params.file, equals(pathname));
+ occurrences = params.occurrences;
});
return analysisFinished.then((_) {
expect(currentAnalysisErrors[pathname], isEmpty);
Set<int> findOffsets(String elementName) {
- for (Map occurrence in occurrences) {
- if (occurrence['element']['name'] == elementName) {
- return occurrence['offsets'].toSet();
+ for (Occurrences occurrence in occurrences) {
+ if (occurrence.element.name == elementName) {
+ return occurrence.offsets.toSet();
}
}
fail('No element found matching $elementName');

Powered by Google App Engine
This is Rietveld 408576698