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

Unified Diff: tests/lib/mirrors/unnamed_library_test.dart

Issue 26291005: dart2js: The name of a library without a library declaration is the empty string. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« sdk/lib/_internal/lib/js_mirrors.dart ('K') | « tests/lib/lib.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/unnamed_library_test.dart
diff --git a/tests/lib/mirrors/unnamed_library_test.dart b/tests/lib/mirrors/unnamed_library_test.dart
index 1e81eaab1284ae5b7f1d4973bfc114ce4572c471..b967689fd28f1c8368c11c3ae9d25cda5859cae3 100644
--- a/tests/lib/mirrors/unnamed_library_test.dart
+++ b/tests/lib/mirrors/unnamed_library_test.dart
@@ -8,8 +8,14 @@ import 'dart:mirrors';
import 'package:expect/expect.dart';
-class C {}
+class Class {}
main() {
- Expect.equals(const Symbol(""), reflectClass(C).owner.simpleName);
+ ClassMirror cm = reflectClass(Class);
+ LibraryMirror lm = cm.owner;
+
+ Expect.equals('Class', MirrorSystem.getName(cm.simpleName));
+ Expect.equals('.Class', MirrorSystem.getName(cm.qualifiedName));
ahe 2013/10/10 11:47:53 This doesn't make sense to me.
+ Expect.equals('', MirrorSystem.getName(lm.simpleName));
+ Expect.equals('', MirrorSystem.getName(lm.qualifiedName));
}
« sdk/lib/_internal/lib/js_mirrors.dart ('K') | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698