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

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

Issue 19405002: Implement reflecting on static fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix a long line. Created 7 years, 5 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
« no previous file with comments | « dart/tests/lib/lib.status ('k') | dart/tests/lib/mirrors/static_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/lib/mirrors/inherit_field_test.dart
diff --git a/dart/tests/lib/mirrors/abstract_test.dart b/dart/tests/lib/mirrors/inherit_field_test.dart
similarity index 50%
copy from dart/tests/lib/mirrors/abstract_test.dart
copy to dart/tests/lib/mirrors/inherit_field_test.dart
index 39923639e08b8a559e2de07d8e825a78c6a994eb..d61e3bb3afd845d00d4feb4160cc72d649b1e55c 100644
--- a/dart/tests/lib/mirrors/abstract_test.dart
+++ b/dart/tests/lib/mirrors/inherit_field_test.dart
@@ -2,18 +2,24 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Test abstract classes are retained.
+// Test inherited fields.
-library test.abstract_test;
+library test.inherit_field_test;
import 'dart:mirrors';
import 'stringify.dart';
-abstract class Foo {
+class Foo {
+ var field;
+}
+
+class Bar extends Foo {
}
void main() {
- expect('Class(s(Foo) in s(test.abstract_test), top-level)',
- reflectClass(Foo));
+ expect('Variable(s(field) in s(Foo))',
+ reflectClass(Foo).members[new Symbol('field')]);
+ expect('<null>',
+ reflectClass(Bar).members[new Symbol('field')]);
}
« no previous file with comments | « dart/tests/lib/lib.status ('k') | dart/tests/lib/mirrors/static_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698