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

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

Issue 16728005: Fix two type errors and dart2dart status. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « dart/tests/language/language.status ('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) 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 library test.reflect_model_test; 5 library test.reflect_model_test;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 10
11 import 'model.dart'; 11 import 'model.dart';
12 12
13 isNoSuchMethodError(e) => e is NoSuchMethodError; 13 isNoSuchMethodError(e) => e is NoSuchMethodError;
14 14
15 name(Declaration mirror) { 15 name(DeclarationMirror mirror) {
16 return (mirror == null) ? '<null>' : stringify(mirror.simpleName); 16 return (mirror == null) ? '<null>' : stringify(mirror.simpleName);
17 } 17 }
18 18
19 stringifyMap(Map map) { 19 stringifyMap(Map map) {
20 var buffer = new StringBuffer('{'); 20 var buffer = new StringBuffer('{');
21 bool first = true; 21 bool first = true;
22 for (String key in map.keys.map(MirrorSystem.getName).toList()..sort()) { 22 for (String key in map.keys.map(MirrorSystem.getName).toList()..sort()) {
23 if (!first) buffer.write(', '); 23 if (!first) buffer.write(', ');
24 first = false; 24 first = false;
25 buffer.write(key); 25 buffer.write(key);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 Expect.equals('aMethod', c.invoke(aMethod, []).reflectee); 160 Expect.equals('aMethod', c.invoke(aMethod, []).reflectee);
161 161
162 Expect.throws(() { a.invoke(bMethod, []); }, isNoSuchMethodError); 162 Expect.throws(() { a.invoke(bMethod, []); }, isNoSuchMethodError);
163 Expect.equals('bMethod', b.invoke(bMethod, []).reflectee); 163 Expect.equals('bMethod', b.invoke(bMethod, []).reflectee);
164 Expect.equals('bMethod', c.invoke(bMethod, []).reflectee); 164 Expect.equals('bMethod', c.invoke(bMethod, []).reflectee);
165 165
166 Expect.throws(() { a.invoke(cMethod, []); }, isNoSuchMethodError); 166 Expect.throws(() { a.invoke(cMethod, []); }, isNoSuchMethodError);
167 Expect.throws(() { b.invoke(cMethod, []); }, isNoSuchMethodError); 167 Expect.throws(() { b.invoke(cMethod, []); }, isNoSuchMethodError);
168 Expect.equals('cMethod', c.invoke(cMethod, []).reflectee); 168 Expect.equals('cMethod', c.invoke(cMethod, []).reflectee);
169 } 169 }
OLDNEW
« no previous file with comments | « dart/tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698