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

Unified Diff: test_reflectable/test/metadata_name_clash_test.dart

Issue 1236983004: Support metadata for methods and fields in the transformed view. (Closed) Base URL: https://github.com/dart-lang/reflectable.git@master
Patch Set: Addressing review. Adding tests for name-clashes. Created 5 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 | « test_reflectable/test/metadata_name_clash_lib.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/metadata_name_clash_test.dart
diff --git a/test_reflectable/test/metadata_name_clash_test.dart b/test_reflectable/test/metadata_name_clash_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..b78e17f9c6d41a920f345d3199f8d057baddd5e0
--- /dev/null
+++ b/test_reflectable/test/metadata_name_clash_test.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2015, the Dart Team. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in
+// the LICENSE file.
+
+library test_reflectable.test.metadata_name_clash_test;
+
+import "metadata_name_clash_lib.dart" as o;
+
+import "package:reflectable/reflectable.dart";
+import "package:unittest/unittest.dart";
+
+class Reflector extends Reflectable {
+ const Reflector() : super(metadataCapability);
+}
+
+class Bar {
+ const Bar();
+}
+
+const Reflectable reflector = const Reflector();
+
+@reflector
+@Bar()
+class C {}
+
+main() {
+ test("Metadata with name-clash", () {
+ expect(reflector.reflectType(C).metadata, [reflector, const Bar()]);
+ expect(
+ o.reflector2.reflectType(o.D).metadata, [o.reflector2, const o.Bar()]);
+ });
+}
« no previous file with comments | « test_reflectable/test/metadata_name_clash_lib.dart ('k') | test_reflectable/test/metadata_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698