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

Side by Side Diff: tests/lib/mirrors/method_mirror_location_test.dart

Issue 922023002: Implement DeclarationMirror.location for all but ParameterMirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
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.method_location; 5 library test.method_location;
6 6
7 import "dart:mirrors"; 7 import "dart:mirrors";
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 part 'method_mirror_location_other.dart'; 10 part 'method_mirror_location_other.dart';
(...skipping 15 matching lines...) Expand all
26 Expect.equals(column, methodMirror.location.column, "column"); 26 Expect.equals(column, methodMirror.location.column, "column");
27 } 27 }
28 28
29 class ClassInMainFile { 29 class ClassInMainFile {
30 30
31 ClassInMainFile(); 31 ClassInMainFile();
32 32
33 method() {} 33 method() {}
34 } 34 }
35 35
36 topLevelInMainFile() {} 36 void topLevelInMainFile() {}
37 spaceIdentedInMainFile() {} 37 spaceIdentedInMainFile() {}
38 tabIdentedInMainFile() {} 38 tabIdentedInMainFile() {}
39 39
40 class HasImplicitConstructor {} 40 class HasImplicitConstructor {}
41 41
42 typedef bool Predicate(num n); 42 typedef bool Predicate(num n);
43 43
44 main() { 44 main() {
45 localFunction(x) { return x; } 45 localFunction(x) { return x; }
46 46
(...skipping 17 matching lines...) Expand all
64 otherSuffix, 11, 3); 64 otherSuffix, 11, 3);
65 expectLocation(reflect(topLevelInOtherFile), otherSuffix, 14, 1); 65 expectLocation(reflect(topLevelInOtherFile), otherSuffix, 14, 1);
66 expectLocation(reflect(spaceIdentedInOtherFile), otherSuffix, 16, 3); 66 expectLocation(reflect(spaceIdentedInOtherFile), otherSuffix, 16, 3);
67 expectLocation(reflect(tabIdentedInOtherFile), otherSuffix, 18, 2); 67 expectLocation(reflect(tabIdentedInOtherFile), otherSuffix, 18, 2);
68 68
69 // Synthetic methods. 69 // Synthetic methods.
70 Expect.isNull(reflectClass(HasImplicitConstructor) 70 Expect.isNull(reflectClass(HasImplicitConstructor)
71 .declarations[#HasImplicitConstructor].location); 71 .declarations[#HasImplicitConstructor].location);
72 Expect.isNull((reflectType(Predicate) as TypedefMirror).referent.callMethod.lo cation); 72 Expect.isNull((reflectType(Predicate) as TypedefMirror).referent.callMethod.lo cation);
73 } 73 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/library_without_declaration.dart ('k') | tests/lib/mirrors/mirrors_reader_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698