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

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

Issue 49083004: Re-triage mirror test failures on the analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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) 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; 5 library test;
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 typedef int _F(int); 10 typedef int _F(int);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 TypeVariableMirror tvm = cm.typeVariables[0]; 103 TypeVariableMirror tvm = cm.typeVariables[0];
104 Expect.isNotNull(tvm); 104 Expect.isNotNull(tvm);
105 Expect.equals(#_T, tvm.simpleName); 105 Expect.equals(#_T, tvm.simpleName);
106 Expect.equals('_T', MirrorSystem.getName(tvm.simpleName)); 106 Expect.equals('_T', MirrorSystem.getName(tvm.simpleName));
107 107
108 TypedefMirror tdm = reflectType(_F); 108 TypedefMirror tdm = reflectType(_F);
109 Expect.equals(#_F, tdm.simpleName); 109 Expect.equals(#_F, tdm.simpleName);
110 Expect.equals('_F', MirrorSystem.getName(tdm.simpleName)); 110 Expect.equals('_F', MirrorSystem.getName(tdm.simpleName));
111 111
112 ParameterMirror pm = cm.members[#m].parameters[0]; 112 ParameterMirror pm = (cm.members[#m] as MethodMirror).parameters[0];
113 Expect.equals(#_p, pm.simpleName); 113 Expect.equals(#_p, pm.simpleName);
114 Expect.equals('_p', MirrorSystem.getName(pm.simpleName)); 114 Expect.equals('_p', MirrorSystem.getName(pm.simpleName));
115 115
116 116
117 // Private symbol without a library. 117 // Private symbol without a library.
118 Expect.throws(() => MirrorSystem.getSymbol('_private'), 118 Expect.throws(() => MirrorSystem.getSymbol('_private'),
119 (e) => e is ArgumentError); 119 (e) => e is ArgumentError);
120 120
121 var notALibraryMirror = 7; 121 var notALibraryMirror = 7;
122 Expect.throws(() => MirrorSystem.getSymbol('_private', notALibraryMirror), 122 Expect.throws(() => MirrorSystem.getSymbol('_private', notALibraryMirror),
123 (e) => e is ArgumentError || e is TypeError); 123 (e) => e is ArgumentError || e is TypeError);
124 124
125 Expect.throws(() => MirrorSystem.getSymbol('public', notALibraryMirror), 125 Expect.throws(() => MirrorSystem.getSymbol('public', notALibraryMirror),
126 (e) => e is ArgumentError || e is TypeError); 126 (e) => e is ArgumentError || e is TypeError);
127 } 127 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/parameter_metadata_test.dart ('k') | tests/lib/mirrors/reflect_class_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698