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

Side by Side Diff: pkg/analysis_server/test/analysis_notification_outline_test.dart

Issue 339933006: Fix for subscribing for notifications after analysis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for review comments Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/test/analysis_notification_navigation_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.domain.analysis.notification.outline; 5 library test.domain.analysis.notification.outline;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:mirrors'; 8 import 'dart:mirrors';
9 9
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 expect(outline.name, "B"); 196 expect(outline.name, "B");
197 expect(outline.nameOffset, testCode.indexOf("B(int p);")); 197 expect(outline.nameOffset, testCode.indexOf("B(int p);"));
198 expect(outline.nameLength, "B".length); 198 expect(outline.nameLength, "B".length);
199 expect(outline.parameters, "(int p)"); 199 expect(outline.parameters, "(int p)");
200 expect(outline.returnType, isNull); 200 expect(outline.returnType, isNull);
201 } 201 }
202 } 202 }
203 }); 203 });
204 } 204 }
205 205
206 test_afterAnalysis() {
207 addTestFile('''
208 class AAA {
209 }
210 class BBB {
211 }
212 ''');
213 return waitForTasksFinished().then((_) {
214 expect(outline, isNull);
215 return prepareOutline(() {
216 _Outline unitOutline = outline;
217 List<_Outline> outlines = unitOutline.children;
218 expect(outlines, hasLength(2));
219 });
220 });
221 }
222
206 test_sourceRange_inClass() { 223 test_sourceRange_inClass() {
207 addTestFile(''' 224 addTestFile('''
208 class A { // leftA 225 class A { // leftA
209 int methodA() {} // endA 226 int methodA() {} // endA
210 int methodB() {} // endB 227 int methodB() {} // endB
211 } 228 }
212 '''); 229 ''');
213 return prepareOutline(() { 230 return prepareOutline(() {
214 _Outline unitOutline = outline; 231 _Outline unitOutline = outline;
215 List<_Outline> outlines = unitOutline.children[0].children; 232 List<_Outline> outlines = unitOutline.children[0].children;
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 map[PARAMETERS], map[RETURN_TYPE]); 695 map[PARAMETERS], map[RETURN_TYPE]);
679 List<Map<String, Object>> childrenMaps = map[CHILDREN]; 696 List<Map<String, Object>> childrenMaps = map[CHILDREN];
680 if (childrenMaps != null) { 697 if (childrenMaps != null) {
681 childrenMaps.forEach((childMap) { 698 childrenMaps.forEach((childMap) {
682 outline.children.add(new _Outline.fromJson(childMap)); 699 outline.children.add(new _Outline.fromJson(childMap));
683 }); 700 });
684 } 701 }
685 return outline; 702 return outline;
686 } 703 }
687 } 704 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis_notification_navigation_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698