summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common_test.h7
-rw-r--r--src/image_test.cc4
2 files changed, 3 insertions, 8 deletions
diff --git a/src/common_test.h b/src/common_test.h
index b3fafe4585..0456c35d39 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -222,7 +222,7 @@ class CommonTest : public testing::Test {
int mkdir_result = mkdir(art_cache_.c_str(), 0700);
ASSERT_EQ(mkdir_result, 0);
- java_lang_dex_file_.reset(GetLibCoreDex());
+ java_lang_dex_file_.reset(DexFile::Open(GetLibCoreDexFileName(), ""));
std::string boot_class_path;
boot_class_path += "-Xbootclasspath:";
@@ -320,11 +320,6 @@ class CommonTest : public testing::Test {
return std::string("/system/framework/core.jar");
}
- const DexFile* GetLibCoreDex() {
- std::string libcore_dex_file_name(GetLibCoreDexFileName());
- return DexFile::Open(libcore_dex_file_name, "");
- }
-
const DexFile* OpenTestDexFile(const char* name) {
CHECK(name != NULL);
std::string filename;
diff --git a/src/image_test.cc b/src/image_test.cc
index 950ca92691..6976787045 100644
--- a/src/image_test.cc
+++ b/src/image_test.cc
@@ -19,7 +19,7 @@ class ImageTest : public CommonTest {};
TEST_F(ImageTest, WriteRead) {
ScratchFile tmp_oat;
std::vector<const DexFile*> dex_files;
- dex_files.push_back(GetLibCoreDex());
+ dex_files.push_back(java_lang_dex_file_.get());
bool success_oat = OatWriter::Create(tmp_oat.GetFile(), NULL, dex_files, *compiler_.get());
ASSERT_TRUE(success_oat);
@@ -59,7 +59,7 @@ TEST_F(ImageTest, WriteRead) {
// lucky by pointers that happen to work referencing the earlier
// dex.
delete java_lang_dex_file_.release();
- UniquePtr<const DexFile> dex(GetLibCoreDex());
+ UniquePtr<const DexFile> dex(DexFile::Open(GetLibCoreDexFileName(), ""));
ASSERT_TRUE(dex.get() != NULL);
Runtime::Options options;