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

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

Issue 429083004: Make private symbol mangling test work on the VM, as well. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/private_symbol_mangling_test.dart
diff --git a/tests/lib/mirrors/private_symbol_mangling_test.dart b/tests/lib/mirrors/private_symbol_mangling_test.dart
index 7ac0753cf1057460e133c98c59b71e5ac8125ced..ebb9371068b54c0386ae2137770eb225af557c34 100644
--- a/tests/lib/mirrors/private_symbol_mangling_test.dart
+++ b/tests/lib/mirrors/private_symbol_mangling_test.dart
@@ -21,7 +21,7 @@ class C1 {
getPrivateGlobalFieldValue(LibraryMirror lib) {
for (Symbol symbol in lib.declarations.keys) {
DeclarationMirror decl = lib.declarations[symbol];
- if (decl is VariableMirror) {
+ if (decl is VariableMirror && decl.isPrivate) {
return lib.getField(symbol).reflectee;
}
}
@@ -30,7 +30,7 @@ getPrivateGlobalFieldValue(LibraryMirror lib) {
getPrivateFieldValue(InstanceMirror cls) {
for (Symbol symbol in cls.type.declarations.keys) {
DeclarationMirror decl = cls.type.declarations[symbol];
- if (decl is VariableMirror) {
+ if (decl is VariableMirror && decl.isPrivate) {
return cls.getField(symbol).reflectee;
}
}
@@ -39,7 +39,7 @@ getPrivateFieldValue(InstanceMirror cls) {
getPrivateGlobalMethodValue(LibraryMirror lib) {
for (Symbol symbol in lib.declarations.keys) {
DeclarationMirror decl = lib.declarations[symbol];
- if (decl is MethodMirror && decl.isRegularMethod) {
+ if (decl is MethodMirror && decl.isRegularMethod && decl.isPrivate) {
return lib.invoke(symbol, []).reflectee;
}
}
@@ -48,7 +48,7 @@ getPrivateGlobalMethodValue(LibraryMirror lib) {
getPrivateMethodValue(InstanceMirror cls) {
for (Symbol symbol in cls.type.declarations.keys) {
DeclarationMirror decl = cls.type.declarations[symbol];
- if (decl is MethodMirror && decl.isRegularMethod) {
+ if (decl is MethodMirror && decl.isRegularMethod && decl.isPrivate) {
return cls.invoke(symbol, []).reflectee;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698