Add image dependency to oat files
Change-Id: I945356f71357f1aa0092f4fe6c57eccfb029b4a6
diff --git a/src/oat_test.cc b/src/oat_test.cc
index 0ca581a..3cbd3ed 100644
--- a/src/oat_test.cc
+++ b/src/oat_test.cc
@@ -34,7 +34,12 @@
}
ScratchFile tmp;
- bool success = OatWriter::Create(tmp.GetFile(), class_loader.get(), class_linker->GetBootClassPath(), *compiler_.get());
+ bool success = OatWriter::Create(tmp.GetFile(),
+ class_loader.get(),
+ class_linker->GetBootClassPath(),
+ 42U,
+ "lue.art",
+ *compiler_.get());
ASSERT_TRUE(success);
if (compile) { // OatWriter strips the code, regenerate to compare
@@ -44,6 +49,8 @@
ASSERT_TRUE(oat_file.get() != NULL);
const OatHeader& oat_header = oat_file->GetOatHeader();
ASSERT_EQ(1U, oat_header.GetDexFileCount());
+ ASSERT_EQ(42U, oat_header.GetImageFileLocationChecksum());
+ ASSERT_EQ("lue.art", oat_header.GetImageFileLocation());
const DexFile* dex_file = java_lang_dex_file_;
const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file->GetLocation());