From 1fe5839d10114209a75d1716bd81c353e4096810 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 10 Apr 2019 16:14:56 +0100 Subject: ObjPtr<>-ify ClassTable. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: Ieced7a452d381e5cacbafc91fd5d7672d9d92c30 --- runtime/class_table_test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/class_table_test.cc') 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())); -- cgit v1.2.3-59-g8ed1b