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

Side by Side Diff: pkg/analysis_server/test/protocol_server_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.computer.element; 5 library test.computer.element;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
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_server.dart'; 10 import 'package:analysis_server/src/protocol_server.dart';
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 expect(element.kind, ElementKind.GETTER); 323 expect(element.kind, ElementKind.GETTER);
324 expect(element.name, 'myGetter'); 324 expect(element.name, 'myGetter');
325 { 325 {
326 Location location = element.location; 326 Location location = element.location;
327 expect(location.file, '/test.dart'); 327 expect(location.file, '/test.dart');
328 expect(location.offset, 23); 328 expect(location.offset, 23);
329 expect(location.length, 'myGetter'.length); 329 expect(location.length, 'myGetter'.length);
330 expect(location.startLine, 2); 330 expect(location.startLine, 2);
331 expect(location.startColumn, 14); 331 expect(location.startColumn, 14);
332 } 332 }
333 expect(element.parameters, '()'); 333 expect(element.parameters, isNull);
334 expect(element.returnType, 'String'); 334 expect(element.returnType, 'String');
335 expect(element.flags, 0); 335 expect(element.flags, 0);
336 } 336 }
337 337
338 void test_fromElement_LABEL() { 338 void test_fromElement_LABEL() {
339 engine.Source source = addSource('/test.dart', ''' 339 engine.Source source = addSource('/test.dart', '''
340 main() { 340 main() {
341 myLabel: 341 myLabel:
342 while (true) { 342 while (true) {
343 break myLabel; 343 break myLabel;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 ApiEnum apiValue = convert(engineValue); 510 ApiEnum apiValue = convert(engineValue);
511 expect(apiValue, equals(expectedResult)); 511 expect(apiValue, equals(expectedResult));
512 } 512 }
513 } else { 513 } else {
514 ApiEnum apiValue = convert(engineValue); 514 ApiEnum apiValue = convert(engineValue);
515 expect(apiValue.name, equals(enumName)); 515 expect(apiValue.name, equals(enumName));
516 } 516 }
517 }); 517 });
518 } 518 }
519 } 519 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis/notification_outline_test.dart ('k') | pkg/analysis_server/tool/spec/spec_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698