diff options
author | 2015-09-30 14:40:33 +0100 | |
---|---|---|
committer | 2015-11-12 10:15:58 +0000 | |
commit | 5b8e6e36e96d6d1921dd356fa46191d1e6a18082 (patch) | |
tree | 33d66d1cb3377447aa687ee4625c5826370d1e85 /runtime/parsed_options_test.cc | |
parent | be26f77dac06fb02b0cc80914b740662bf8d0b26 (diff) |
Fix for gtest missing core classes, attempt 2
common_runtime_test loads both core-libart and
core-oj
Change-Id: I8a4d5750b99aed2e500cad89b841a57fe9c1ca69
Diffstat (limited to 'runtime/parsed_options_test.cc')
-rw-r--r-- | runtime/parsed_options_test.cc | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/runtime/parsed_options_test.cc b/runtime/parsed_options_test.cc index 5154d69292..e5cb30d1b3 100644 --- a/runtime/parsed_options_test.cc +++ b/runtime/parsed_options_test.cc @@ -30,18 +30,27 @@ TEST_F(ParsedOptionsTest, ParsedOptions) { void* test_exit = reinterpret_cast<void*>(0xc); void* null = reinterpret_cast<void*>(NULL); - std::string lib_core(GetLibCoreDexFileName()); - std::string boot_class_path; + std::string class_path; boot_class_path += "-Xbootclasspath:"; - boot_class_path += lib_core; + + bool first_dex_file = true; + for (const std::string &dex_file_name : GetLibCoreDexFileNames()) { + if (!first_dex_file) { + class_path += ":"; + } else { + first_dex_file = false; + } + class_path += dex_file_name; + } + boot_class_path += class_path; RuntimeOptions options; options.push_back(std::make_pair(boot_class_path.c_str(), null)); options.push_back(std::make_pair("-classpath", null)); - options.push_back(std::make_pair(lib_core.c_str(), null)); + options.push_back(std::make_pair(class_path.c_str(), null)); options.push_back(std::make_pair("-cp", null)); - options.push_back(std::make_pair(lib_core.c_str(), null)); + options.push_back(std::make_pair(class_path.c_str(), null)); options.push_back(std::make_pair("-Ximage:boot_image", null)); options.push_back(std::make_pair("-Xcheck:jni", null)); options.push_back(std::make_pair("-Xms2048", null)); @@ -57,8 +66,8 @@ TEST_F(ParsedOptionsTest, ParsedOptions) { std::unique_ptr<ParsedOptions> parsed(ParsedOptions::Create(options, false)); ASSERT_TRUE(parsed.get() != NULL); - EXPECT_EQ(lib_core, parsed->boot_class_path_string_); - EXPECT_EQ(lib_core, parsed->class_path_string_); + EXPECT_EQ(class_path, parsed->boot_class_path_string_); + EXPECT_EQ(class_path, parsed->class_path_string_); EXPECT_EQ(std::string("boot_image"), parsed->image_); EXPECT_EQ(true, parsed->check_jni_); EXPECT_EQ(2048U, parsed->heap_initial_size_); |