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

Unified Diff: test_reflectable/test/declarations_test.dart

Issue 1289933004: Implements support for reflection on parameters. (Closed) Base URL: https://github.com/dart-lang/reflectable.git@master
Patch Set: Merging with code from Sigurd, caused several adjustments Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test_reflectable/test/capabilities_test.dart ('k') | test_reflectable/test/metadata_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test_reflectable/test/declarations_test.dart
diff --git a/test_reflectable/test/declarations_test.dart b/test_reflectable/test/declarations_test.dart
index 3e8fb07bcb8d2a1c7af333b3f7264661b47dc797..0d5271ca1bc0a4e908c326f18273342961208a02 100644
--- a/test_reflectable/test/declarations_test.dart
+++ b/test_reflectable/test/declarations_test.dart
@@ -8,7 +8,9 @@ import "package:reflectable/reflectable.dart";
import "package:unittest/unittest.dart";
class Reflector extends Reflectable {
- const Reflector() : super(instanceInvokeCapability, newInstanceCapability);
+ const Reflector()
+ : super(instanceInvokeCapability, newInstanceCapability,
+ declarationsCapability);
}
// TODO(sigurdm) implement: Adapt this test when we support fields.
@@ -49,18 +51,20 @@ main() {
reflector.reflectType(B).declarations;
test("declarations", () {
- expect(declarationsA.values.map((x) => x.simpleName), new Set.from([
- "foo",
- "getter1",
- "getter2",
- "setter1=",
- "+",
- "A",
- "A.redirecting",
- "A.factory",
- "A.redirectingFactory",
- "A.c"
- ]));
+ expect(
+ declarationsA.values.map((x) => x.simpleName),
+ new Set.from([
+ "foo",
+ "getter1",
+ "getter2",
+ "setter1=",
+ "+",
+ "A",
+ "A.redirecting",
+ "A.factory",
+ "A.redirectingFactory",
+ "A.c"
+ ]));
expect(declarationsB.values.map((x) => x.simpleName),
new Set.from(["bar", "getter1", "getter2", "setter2=", "B"]));
@@ -162,32 +166,36 @@ main() {
test("instanceMethods", () {
Map<String, DeclarationMirror> instanceMembersA =
reflector.reflectType(A).instanceMembers;
- expect(instanceMembersA.values.map((x) => x.simpleName), new Set.from([
- "toString",
- "hashCode",
- "==",
- "noSuchMethod",
- "runtimeType",
- "foo",
- "getter1",
- "setter1=",
- "+"
- ]));
+ expect(
+ instanceMembersA.values.map((x) => x.simpleName),
+ new Set.from([
+ "toString",
+ "hashCode",
+ "==",
+ "noSuchMethod",
+ "runtimeType",
+ "foo",
+ "getter1",
+ "setter1=",
+ "+"
+ ]));
Map<String, DeclarationMirror> instanceMembersB =
reflector.reflectType(B).instanceMembers;
- expect(instanceMembersB.values.map((x) => x.simpleName), new Set.from([
- "toString",
- "hashCode",
- "==",
- "noSuchMethod",
- "runtimeType",
- "foo",
- "bar",
- "getter1",
- "getter2",
- "setter1=",
- "setter2=",
- "+"
- ]));
+ expect(
+ instanceMembersB.values.map((x) => x.simpleName),
+ new Set.from([
+ "toString",
+ "hashCode",
+ "==",
+ "noSuchMethod",
+ "runtimeType",
+ "foo",
+ "bar",
+ "getter1",
+ "getter2",
+ "setter1=",
+ "setter2=",
+ "+"
+ ]));
});
}
« no previous file with comments | « test_reflectable/test/capabilities_test.dart ('k') | test_reflectable/test/metadata_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698