From a5b09a67034e57a6e10231dd4bd92f4cb50b824c Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 17 Nov 2016 15:21:22 -0800 Subject: ART: Add dex::TypeIndex Add abstraction for uint16_t type index. Test: m test-art-host Change-Id: I47708741c7c579cbbe59ab723c1e31c5fe71f83a --- runtime/dex_file_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/dex_file_test.cc') diff --git a/runtime/dex_file_test.cc b/runtime/dex_file_test.cc index 8e1501ff16..f94d07b252 100644 --- a/runtime/dex_file_test.cc +++ b/runtime/dex_file_test.cc @@ -415,14 +415,14 @@ TEST_F(DexFileTest, FindStringId) { TEST_F(DexFileTest, FindTypeId) { for (size_t i = 0; i < java_lang_dex_file_->NumTypeIds(); i++) { - const char* type_str = java_lang_dex_file_->StringByTypeIdx(i); + const char* type_str = java_lang_dex_file_->StringByTypeIdx(dex::TypeIndex(i)); const DexFile::StringId* type_str_id = java_lang_dex_file_->FindStringId(type_str); ASSERT_TRUE(type_str_id != nullptr); uint32_t type_str_idx = java_lang_dex_file_->GetIndexForStringId(*type_str_id); const DexFile::TypeId* type_id = java_lang_dex_file_->FindTypeId(type_str_idx); ASSERT_EQ(type_id, java_lang_dex_file_->FindTypeId(type_str)); ASSERT_TRUE(type_id != nullptr); - EXPECT_EQ(java_lang_dex_file_->GetIndexForTypeId(*type_id), i); + EXPECT_EQ(java_lang_dex_file_->GetIndexForTypeId(*type_id).index_, i); } } @@ -430,7 +430,7 @@ TEST_F(DexFileTest, FindProtoId) { for (size_t i = 0; i < java_lang_dex_file_->NumProtoIds(); i++) { const DexFile::ProtoId& to_find = java_lang_dex_file_->GetProtoId(i); const DexFile::TypeList* to_find_tl = java_lang_dex_file_->GetProtoParameters(to_find); - std::vector to_find_types; + std::vector to_find_types; if (to_find_tl != nullptr) { for (size_t j = 0; j < to_find_tl->Size(); j++) { to_find_types.push_back(to_find_tl->GetTypeItem(j).type_idx_); -- cgit v1.2.3-59-g8ed1b