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

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

Issue 24005002: Make TypedefMirror a direct descendant of TypeMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 MirrorsTest; 5 library MirrorsTest;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 8
9 import '../../light_unittest.dart'; 9 import '../../light_unittest.dart';
10 10
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 if (!isDart2js) { // TODO(ahe): Implement this in dart2js. 245 if (!isDart2js) { // TODO(ahe): Implement this in dart2js.
246 TypeVariableMirror typeVariable = classMirror.typeVariables.values.single; 246 TypeVariableMirror typeVariable = classMirror.typeVariables.values.single;
247 expect(typeVariable.simpleName, equals(const Symbol('T'))); 247 expect(typeVariable.simpleName, equals(const Symbol('T')));
248 expect(typeVariable.qualifiedName, 248 expect(typeVariable.qualifiedName,
249 equals(const Symbol('MirrorsTest.Class.T'))); 249 equals(const Symbol('MirrorsTest.Class.T')));
250 250
251 expect(typedefMirror.simpleName, equals(const Symbol('Typedef'))); 251 expect(typedefMirror.simpleName, equals(const Symbol('Typedef')));
252 expect(typedefMirror.qualifiedName, 252 expect(typedefMirror.qualifiedName,
253 equals(const Symbol('MirrorsTest.Typedef'))); 253 equals(const Symbol('MirrorsTest.Typedef')));
254 254
255 var typedefMirrorDeNovo = reflectClass(Typedef); 255 var typedefMirrorDeNovo = reflectType(Typedef);
256 expect(typedefMirrorDeNovo.simpleName, equals(const Symbol('Typedef'))); 256 expect(typedefMirrorDeNovo.simpleName, equals(const Symbol('Typedef')));
257 expect(typedefMirrorDeNovo.qualifiedName, 257 expect(typedefMirrorDeNovo.qualifiedName,
258 equals(const Symbol('MirrorsTest.Typedef'))); 258 equals(const Symbol('MirrorsTest.Typedef')));
259 } 259 }
260 260
261 expect(methodMirror.simpleName, equals(const Symbol('testNames'))); 261 expect(methodMirror.simpleName, equals(const Symbol('testNames')));
262 expect(methodMirror.qualifiedName, 262 expect(methodMirror.qualifiedName,
263 equals(const Symbol('MirrorsTest.testNames'))); 263 equals(const Symbol('MirrorsTest.testNames')));
264 264
265 expect(variableMirror.simpleName, equals(const Symbol('field'))); 265 expect(variableMirror.simpleName, equals(const Symbol('field')));
(...skipping 19 matching lines...) Expand all
285 test("Test current library uri", () { 285 test("Test current library uri", () {
286 testLibraryUri(new Class(), 286 testLibraryUri(new Class(),
287 (Uri uri) => uri.path.endsWith('/mirrors_test.dart')); 287 (Uri uri) => uri.path.endsWith('/mirrors_test.dart'));
288 }); 288 });
289 test("Test dart library uri", () { 289 test("Test dart library uri", () {
290 testLibraryUri("test", (Uri uri) => uri == Uri.parse('dart:core')); 290 testLibraryUri("test", (Uri uri) => uri == Uri.parse('dart:core'));
291 }); 291 });
292 test("Test simple and qualifiedName", () { testNames(mirrors); }); 292 test("Test simple and qualifiedName", () { testNames(mirrors); });
293 test("Test reflect type", () { testReflectClass(mirrors); }); 293 test("Test reflect type", () { testReflectClass(mirrors); });
294 } 294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698