summaryrefslogtreecommitdiffstats
path: root/runtime/proxy_test.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-09-11 08:30:08 -0700
committerAndreas Gampe <agampe@google.com>2014-09-15 19:50:12 -0700
commit5a4b8a236030460651a3136397d23ca6744e7eb7 (patch)
tree0e43891398e416d3fa77c7de391bf4db4408e8ee /runtime/proxy_test.cc
parent19f7c95491a053b818f914137fa73df0517b8792 (diff)
downloadart-5a4b8a236030460651a3136397d23ca6744e7eb7.zip
art-5a4b8a236030460651a3136397d23ca6744e7eb7.tar.gz
art-5a4b8a236030460651a3136397d23ca6744e7eb7.tar.bz2
ART: Rename Handle hierarchy
Bring the names in line with normal OO principles: ConstHandle becomes Handle, and Handle becomes MutableHandle. Change-Id: I0f018eb7ba28bc422e3a23dd73a6cbe6fc2d2044
Diffstat (limited to 'runtime/proxy_test.cc')
-rw-r--r--runtime/proxy_test.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/runtime/proxy_test.cc b/runtime/proxy_test.cc
index d977ce9..1eded62 100644
--- a/runtime/proxy_test.cc
+++ b/runtime/proxy_test.cc
@@ -183,7 +183,8 @@ TEST_F(ProxyTest, ProxyFieldHelper) {
ASSERT_TRUE(throwsFieldClass.Get() != nullptr);
// Test "Class[] interfaces" field.
- FieldHelper fh(hs.NewHandle(static_fields->Get(0)));
+ MutableHandle<mirror::ArtField> fhandle = hs.NewHandle(static_fields->Get(0));
+ FieldHelper fh(fhandle);
EXPECT_EQ("interfaces", std::string(fh.GetField()->GetName()));
EXPECT_EQ("[Ljava/lang/Class;", std::string(fh.GetField()->GetTypeDescriptor()));
EXPECT_EQ(interfacesFieldClass.Get(), fh.GetType());
@@ -191,12 +192,13 @@ TEST_F(ProxyTest, ProxyFieldHelper) {
EXPECT_FALSE(fh.GetField()->IsPrimitiveType());
// Test "Class[][] throws" field.
- fh.ChangeField(static_fields->Get(1));
- EXPECT_EQ("throws", std::string(fh.GetField()->GetName()));
- EXPECT_EQ("[[Ljava/lang/Class;", std::string(fh.GetField()->GetTypeDescriptor()));
- EXPECT_EQ(throwsFieldClass.Get(), fh.GetType());
- EXPECT_EQ("L$Proxy1234;", std::string(fh.GetDeclaringClassDescriptor()));
- EXPECT_FALSE(fh.GetField()->IsPrimitiveType());
+ fhandle.Assign(static_fields->Get(1));
+ FieldHelper fh2(fhandle);
+ EXPECT_EQ("throws", std::string(fh2.GetField()->GetName()));
+ EXPECT_EQ("[[Ljava/lang/Class;", std::string(fh2.GetField()->GetTypeDescriptor()));
+ EXPECT_EQ(throwsFieldClass.Get(), fh2.GetType());
+ EXPECT_EQ("L$Proxy1234;", std::string(fh2.GetDeclaringClassDescriptor()));
+ EXPECT_FALSE(fh2.GetField()->IsPrimitiveType());
}
} // namespace art