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

Unified Diff: tests/compiler/dart2js/patch_test.dart

Issue 12223004: Allow private selectors to be typed, and fix ClassElement.isSubclassOf to take patches into account. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
Index: tests/compiler/dart2js/patch_test.dart
===================================================================
--- tests/compiler/dart2js/patch_test.dart (revision 18125)
+++ tests/compiler/dart2js/patch_test.dart (working copy)
@@ -416,6 +416,22 @@
compiler.errors[0].message.toString());
}
+testIsSubclass() {
+ var compiler = applyPatch(
+ """
+ class A {}
+ """,
+ """
+ patch class A {}
+ """);
+ ClassElement cls = ensure(compiler, "A", compiler.coreLibrary.find,
+ expectIsPatched: true);
+ ClassElement patch = cls.patch;
+ Expect.isTrue(cls != patch);
+ Expect.isTrue(cls.isSubclassOf(patch));
+ Expect.isTrue(patch.isSubclassOf(cls));
+}
+
main() {
testPatchFunction();
testPatchMember();
@@ -427,4 +443,6 @@
testExternalWithoutImplementationTopLevel();
testExternalWithoutImplementationMember();
+
+ testIsSubclass();
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/universe/universe.dart ('k') | tests/language/private_selector_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698