summaryrefslogtreecommitdiff
path: root/cmdline/cmdline_parser_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-12-07 18:04:10 +0000
committer Vladimir Marko <vmarko@google.com> 2018-12-07 18:13:55 +0000
commit91f1032505cfaec3aef51fc0a3085b213813f0ed (patch)
tree6469e772d9fb562d26dc1d22dd0b71844bbb743f /cmdline/cmdline_parser_test.cc
parent573b3877fac3c5a4a9703301502694fe7219b21c (diff)
Revert^2 "Pass boot class path to ImageSpace::LoadBootImage."
This reverts commit db4b1deebf425be5f1d0f597d1ef540f19908324. Fixed JDWP tests, see "Test:" stanzas below. Change-Id: I6fb56ac990b78164cbd3f93c9f6df66e0dd9a813 Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing Test: run-libcore-tests.sh --mode=device --variant=X64 Test: run-jdwp-tests.sh --mode=host --variant=X64 Test: run-jdwp-tests.sh --mode=device --variant=X64 Bug: 119868597
Diffstat (limited to 'cmdline/cmdline_parser_test.cc')
-rw-r--r--cmdline/cmdline_parser_test.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc
index 97daafadd8..101e5c42cd 100644
--- a/cmdline/cmdline_parser_test.cc
+++ b/cmdline/cmdline_parser_test.cc
@@ -63,6 +63,12 @@ namespace art {
return expected == actual;
}
+ template <char Separator>
+ bool UsuallyEquals(const std::vector<std::string>& expected,
+ const ParseStringList<Separator>& actual) {
+ return expected == static_cast<std::vector<std::string>>(actual);
+ }
+
// Try to use memcmp to compare simple plain-old-data structs.
//
// This should *not* generate false positives, but it can generate false negatives.
@@ -218,8 +224,13 @@ TEST_F(CmdlineParserTest, TestSimpleSuccesses) {
}
EXPECT_SINGLE_PARSE_EXISTS("-Xzygote", M::Zygote);
- EXPECT_SINGLE_PARSE_VALUE_STR("/hello/world", "-Xbootclasspath:/hello/world", M::BootClassPath);
- EXPECT_SINGLE_PARSE_VALUE("/hello/world", "-Xbootclasspath:/hello/world", M::BootClassPath);
+ EXPECT_SINGLE_PARSE_VALUE(std::vector<std::string>({"/hello/world"}),
+ "-Xbootclasspath:/hello/world",
+ M::BootClassPath);
+ EXPECT_SINGLE_PARSE_VALUE(std::vector<std::string>({"/hello", "/world"}),
+ "-Xbootclasspath:/hello:/world",
+ M::BootClassPath);
+ EXPECT_SINGLE_PARSE_VALUE_STR("/hello/world", "-classpath /hello/world", M::ClassPath);
EXPECT_SINGLE_PARSE_VALUE(Memory<1>(234), "-Xss234", M::StackSize);
EXPECT_SINGLE_PARSE_VALUE(MemoryKiB(1234*MB), "-Xms1234m", M::MemoryInitialSize);
EXPECT_SINGLE_PARSE_VALUE(true, "-XX:EnableHSpaceCompactForOOM", M::EnableHSpaceCompactForOOM);