diff options
author | 2015-11-12 11:49:06 +0000 | |
---|---|---|
committer | 2015-11-12 11:52:42 +0000 | |
commit | d1ef4362bf799f9f5d50e5edef8433664b503051 (patch) | |
tree | 59aaa140925efa790f787d5e1caf6d0cafd6ae15 /runtime/parsed_options_test.cc | |
parent | e4cf5892c2a244034900d49499c071b255571bba (diff) | |
parent | f32e8327da5dd33abe18662fbca5e584cd047816 (diff) |
Merge lmp changes into mnc.
Most merge conflicts are due to changes in the string representation.
They have been resolved in favour of "mnc-dev" since we've changed
the string representation there. Other changes relate to the
fact that there are now two jars in libcore (core-oj and core-libart).
Change-Id: I1fcc6e5f8dab8d1954dcddca0493563e7677d433
Diffstat (limited to 'runtime/parsed_options_test.cc')
-rw-r--r-- | runtime/parsed_options_test.cc | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/runtime/parsed_options_test.cc b/runtime/parsed_options_test.cc index a8575de425..eee4910182 100644 --- a/runtime/parsed_options_test.cc +++ b/runtime/parsed_options_test.cc @@ -34,18 +34,28 @@ TEST_F(ParsedOptionsTest, ParsedOptions) { void* test_abort = reinterpret_cast<void*>(0xb); void* test_exit = reinterpret_cast<void*>(0xc); - std::string lib_core(CommonRuntimeTest::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 : + CommonRuntimeTest::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(), nullptr)); options.push_back(std::make_pair("-classpath", nullptr)); - options.push_back(std::make_pair(lib_core.c_str(), nullptr)); + options.push_back(std::make_pair(class_path.c_str(), nullptr)); options.push_back(std::make_pair("-cp", nullptr)); - options.push_back(std::make_pair(lib_core.c_str(), nullptr)); + options.push_back(std::make_pair(class_path.c_str(), nullptr)); options.push_back(std::make_pair("-Ximage:boot_image", nullptr)); options.push_back(std::make_pair("-Xcheck:jni", nullptr)); options.push_back(std::make_pair("-Xms2048", nullptr)); @@ -69,8 +79,8 @@ TEST_F(ParsedOptionsTest, ParsedOptions) { #define EXPECT_PARSED_EQ(expected, actual_key) EXPECT_EQ(expected, map.GetOrDefault(actual_key)) #define EXPECT_PARSED_EXISTS(actual_key) EXPECT_TRUE(map.Exists(actual_key)) - EXPECT_PARSED_EQ(lib_core, Opt::BootClassPath); - EXPECT_PARSED_EQ(lib_core, Opt::ClassPath); + EXPECT_PARSED_EQ(class_path, Opt::BootClassPath); + EXPECT_PARSED_EQ(class_path, Opt::ClassPath); EXPECT_PARSED_EQ(std::string("boot_image"), Opt::Image); EXPECT_PARSED_EXISTS(Opt::CheckJni); EXPECT_PARSED_EQ(2048U, Opt::MemoryInitialSize); |