summaryrefslogtreecommitdiff
path: root/runtime/dex/dex_file_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/dex/dex_file_test.cc')
-rw-r--r--runtime/dex/dex_file_test.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/dex/dex_file_test.cc b/runtime/dex/dex_file_test.cc
index 1c8b3e4180..cb721af754 100644
--- a/runtime/dex/dex_file_test.cc
+++ b/runtime/dex/dex_file_test.cc
@@ -738,8 +738,10 @@ TEST_F(DexFileTest, OpenDexDebugInfoLocalNullType) {
std::unique_ptr<const DexFile> raw = OpenDexFileInMemoryBase64(
kRawDexDebugInfoLocalNullType, tmp.GetFilename().c_str(), 0xf25f2b38U, true);
const DexFile::ClassDef& class_def = raw->GetClassDef(0);
- const DexFile::CodeItem* code_item = raw->GetCodeItem(raw->FindCodeItemOffset(class_def, 1));
- CodeItemDebugInfoAccessor accessor(*raw, code_item);
+ constexpr uint32_t kMethodIdx = 1;
+ const DexFile::CodeItem* code_item = raw->GetCodeItem(raw->FindCodeItemOffset(class_def,
+ kMethodIdx));
+ CodeItemDebugInfoAccessor accessor(*raw, code_item, kMethodIdx);
ASSERT_TRUE(accessor.DecodeDebugLocalInfo(true, 1, Callback, nullptr));
}