summaryrefslogtreecommitdiff
path: root/runtime/class_table_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-04-10 16:14:56 +0100
committer Vladimir Marko <vmarko@google.com> 2019-05-08 08:19:28 +0000
commit1fe5839d10114209a75d1716bd81c353e4096810 (patch)
tree1c4453056b53a1c9f362c697148a6f809690bb71 /runtime/class_table_test.cc
parentc6934e36d33ab402b7b51c78d46c319fc33e8ef3 (diff)
ObjPtr<>-ify ClassTable.
Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: Ieced7a452d381e5cacbafc91fd5d7672d9d92c30
Diffstat (limited to 'runtime/class_table_test.cc')
-rw-r--r--runtime/class_table_test.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/class_table_test.cc b/runtime/class_table_test.cc
index 2270662260..5275c7ea95 100644
--- a/runtime/class_table_test.cc
+++ b/runtime/class_table_test.cc
@@ -87,9 +87,9 @@ TEST_F(ClassTableTest, ClassTable) {
// Add h_X to the class table.
table.Insert(h_X.Get());
- EXPECT_EQ(table.LookupByDescriptor(h_X.Get()), h_X.Get());
- EXPECT_EQ(table.Lookup(descriptor_x, ComputeModifiedUtf8Hash(descriptor_x)), h_X.Get());
- EXPECT_EQ(table.Lookup("NOT_THERE", ComputeModifiedUtf8Hash("NOT_THERE")), nullptr);
+ EXPECT_OBJ_PTR_EQ(table.LookupByDescriptor(h_X.Get()), h_X.Get());
+ EXPECT_OBJ_PTR_EQ(table.Lookup(descriptor_x, ComputeModifiedUtf8Hash(descriptor_x)), h_X.Get());
+ EXPECT_TRUE(table.Lookup("NOT_THERE", ComputeModifiedUtf8Hash("NOT_THERE")) == nullptr);
EXPECT_EQ(table.NumZygoteClasses(class_loader.Get()), 0u);
EXPECT_EQ(table.NumNonZygoteClasses(class_loader.Get()), 1u);
@@ -99,11 +99,11 @@ TEST_F(ClassTableTest, ClassTable) {
EXPECT_EQ(table.NumNonZygoteClasses(class_loader.Get()), 0u);
// Test inserting and related lookup functions.
- EXPECT_EQ(table.LookupByDescriptor(h_Y.Get()), nullptr);
+ EXPECT_TRUE(table.LookupByDescriptor(h_Y.Get()) == nullptr);
EXPECT_FALSE(table.Contains(h_Y.Get()));
table.Insert(h_Y.Get());
- EXPECT_EQ(table.LookupByDescriptor(h_X.Get()), h_X.Get());
- EXPECT_EQ(table.LookupByDescriptor(h_Y.Get()), h_Y.Get());
+ EXPECT_OBJ_PTR_EQ(table.LookupByDescriptor(h_X.Get()), h_X.Get());
+ EXPECT_OBJ_PTR_EQ(table.LookupByDescriptor(h_Y.Get()), h_Y.Get());
EXPECT_TRUE(table.Contains(h_X.Get()));
EXPECT_TRUE(table.Contains(h_Y.Get()));