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

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

Issue 1070833002: Fix static warning in lib/mirrors/method_mirror_source_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | « no previous file | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import "dart:mirrors"; 5 import "dart:mirrors";
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import "method_mirror_source_other.dart"; 7 import "method_mirror_source_other.dart";
8 8
9 expectSource(Mirror mirror, String source) { 9 expectSource(Mirror mirror, String source) {
10 MethodMirror methodMirror; 10 MethodMirror methodMirror;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 expectSource(reflect((){}), "(){}"); 93 expectSource(reflect((){}), "(){}");
94 expectSource(reflect((x,y,z) { return x*y*z; }), "(x,y,z) { return x*y*z; }"); 94 expectSource(reflect((x,y,z) { return x*y*z; }), "(x,y,z) { return x*y*z; }");
95 expectSource(reflect((e) => doSomething(e)), "(e) => doSomething(e)"); 95 expectSource(reflect((e) => doSomething(e)), "(e) => doSomething(e)");
96 96
97 namedClosure(x,y,z) => 1; 97 namedClosure(x,y,z) => 1;
98 var a = () {}; 98 var a = () {};
99 expectSource(reflect(namedClosure), "namedClosure(x,y,z) => 1;"); 99 expectSource(reflect(namedClosure), "namedClosure(x,y,z) => 1;");
100 expectSource(reflect(a), "() {}"); 100 expectSource(reflect(a), "() {}");
101 101
102 // Function at first line. 102 // Function at first line.
103 expectSource(reflectClass(SomethingInOther).owner.declarations[#main], 103 LibraryMirror otherLib = reflectClass(SomethingInOther).owner;
104 expectSource(otherLib.declarations[#main],
104 """main() { 105 """main() {
105 print("Blah"); 106 print("Blah");
106 }"""); 107 }""");
107 } 108 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698