summaryrefslogtreecommitdiff
path: root/compiler/oat_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/oat_test.cc')
-rw-r--r--compiler/oat_test.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc
index 9cfef12b26..b5d39232ca 100644
--- a/compiler/oat_test.cc
+++ b/compiler/oat_test.cc
@@ -155,19 +155,19 @@ TEST_F(OatTest, WriteRead) {
SirtRef<mirror::ClassLoader> loader(soa.Self(), nullptr);
mirror::Class* klass = class_linker->FindClass(soa.Self(), descriptor, loader);
- UniquePtr<const OatFile::OatClass> oat_class(oat_dex_file->GetOatClass(i));
- CHECK_EQ(mirror::Class::Status::kStatusNotReady, oat_class->GetStatus()) << descriptor;
+ const OatFile::OatClass oat_class = oat_dex_file->GetOatClass(i);
+ CHECK_EQ(mirror::Class::Status::kStatusNotReady, oat_class.GetStatus()) << descriptor;
CHECK_EQ(kCompile ? OatClassType::kOatClassAllCompiled : OatClassType::kOatClassNoneCompiled,
- oat_class->GetType()) << descriptor;
+ oat_class.GetType()) << descriptor;
size_t method_index = 0;
for (size_t i = 0; i < klass->NumDirectMethods(); i++, method_index++) {
CheckMethod(klass->GetDirectMethod(i),
- oat_class->GetOatMethod(method_index), dex_file);
+ oat_class.GetOatMethod(method_index), dex_file);
}
for (size_t i = 0; i < num_virtual_methods; i++, method_index++) {
CheckMethod(klass->GetVirtualMethod(i),
- oat_class->GetOatMethod(method_index), dex_file);
+ oat_class.GetOatMethod(method_index), dex_file);
}
}
}
@@ -176,7 +176,8 @@ TEST_F(OatTest, OatHeaderSizeCheck) {
// If this test is failing and you have to update these constants,
// it is time to update OatHeader::kOatVersion
EXPECT_EQ(80U, sizeof(OatHeader));
- EXPECT_EQ(28U, sizeof(OatMethodOffsets));
+ EXPECT_EQ(20U, sizeof(OatMethodOffsets));
+ EXPECT_EQ(12U, sizeof(OatMethodHeader));
}
TEST_F(OatTest, OatHeaderIsValid) {