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

Side by Side Diff: test/codegen/lib/mirrors/deferred_mirrors_metadata_lib.dart

Issue 2265533002: Add mirrors tests (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
(Empty)
1 library lib;
2
3 import "deferred_mirrors_metadata_test.dart";
4 @MirrorsUsed(
5 targets: const ["main", "main.A", "main.B", "main.C", "main.D", "lib.E"])
6 import "dart:mirrors";
7
8 class H {
9 const H();
10 }
11
12 class F {
13 @H() final int f;
14 }
15
16 @C() class E {
17 @D() var f;
18 }
19
20 String foo() {
21 String c = reflectClass(E).metadata[0].invoke(#toString, []).reflectee;
22 String d = reflectClass(E).declarations[#f].metadata[0]
23 .invoke(#toString, []).reflectee;
24 InstanceMirror i = currentMirrorSystem().findLibrary(#main).metadata[0];
25 String a = i.invoke(#toString, []).reflectee;
26 String b = i.getField(#b).invoke(#toString, []).reflectee;
27 return a + b + c + d;
28 }
29
OLDNEW
« no previous file with comments | « test/codegen/lib/mirrors/declarations_type_test.dart ('k') | test/codegen/lib/mirrors/deferred_mirrors_metadata_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698