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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_outline_test.dart

Issue 787603004: Getters should not have parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
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.analysis.notification.outline; 5 library test.analysis.notification.outline;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/constants.dart'; 9 import 'package:analysis_server/src/constants.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 { 199 {
200 Outline outline = outlines_A[8]; 200 Outline outline = outlines_A[8];
201 Element element = outline.element; 201 Element element = outline.element;
202 expect(element.kind, ElementKind.GETTER); 202 expect(element.kind, ElementKind.GETTER);
203 expect(element.name, "propA"); 203 expect(element.name, "propA");
204 { 204 {
205 Location location = element.location; 205 Location location = element.location;
206 expect(location.offset, testCode.indexOf("propA => null;")); 206 expect(location.offset, testCode.indexOf("propA => null;"));
207 expect(location.length, "propA".length); 207 expect(location.length, "propA".length);
208 } 208 }
209 expect(element.parameters, ""); 209 expect(element.parameters, isNull);
210 expect(element.returnType, "String"); 210 expect(element.returnType, "String");
211 } 211 }
212 { 212 {
213 Outline outline = outlines_A[9]; 213 Outline outline = outlines_A[9];
214 Element element = outline.element; 214 Element element = outline.element;
215 expect(element.kind, ElementKind.SETTER); 215 expect(element.kind, ElementKind.SETTER);
216 expect(element.name, "propB"); 216 expect(element.name, "propB");
217 { 217 {
218 Location location = element.location; 218 Location location = element.location;
219 expect(location.offset, testCode.indexOf("propB(int v) {}")); 219 expect(location.offset, testCode.indexOf("propB(int v) {}"));
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 Location location = element.location; 754 Location location = element.location;
755 expect(location.offset, testCode.indexOf("propB(int v) {}")); 755 expect(location.offset, testCode.indexOf("propB(int v) {}"));
756 expect(location.length, "propB".length); 756 expect(location.length, "propB".length);
757 } 757 }
758 expect(element.parameters, "(int v)"); 758 expect(element.parameters, "(int v)");
759 expect(element.returnType, ""); 759 expect(element.returnType, "");
760 } 760 }
761 }); 761 });
762 } 762 }
763 } 763 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/protocol_server.dart ('k') | pkg/analysis_server/test/protocol_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698