Home
last modified time | relevance | path

Searched refs:CmdlineResult (Results 1 – 7 of 7) sorted by relevance

/art/cmdline/
Dcmdline_result.h27 struct CmdlineResult { struct
53 explicit CmdlineResult(Status status) : status_(status) {} in CmdlineResult() argument
56 CmdlineResult(Status status, const std::string& message) in CmdlineResult() function
62 CmdlineResult(Status status, std::string&& message) in CmdlineResult() function
68 CmdlineResult(const CmdlineResult&) = default;
70 CmdlineResult(CmdlineResult&&) = default;
78 static inline std::ostream& operator<<(std::ostream& stream, CmdlineResult::Status status) { argument
80 case CmdlineResult::kSuccess:
83 case CmdlineResult::kUsage:
86 case CmdlineResult::kFailure:
[all …]
Dcmdline_parse_result.h30 struct CmdlineParseResult : CmdlineResult {
31 using CmdlineResult::CmdlineResult;
126 : CmdlineResult(kSuccess), value_(value), has_value_(true) {} in CmdlineParseResult()
128 : CmdlineResult(kSuccess), value_(std::forward<T>(value)), has_value_(true) {} in CmdlineParseResult()
130 : CmdlineResult(kSuccess), value_(), has_value_(false) {} in CmdlineParseResult()
Dcmdline_parser_test.cc135 static ::testing::AssertionResult IsResultSuccessful(CmdlineResult result) { in IsResultSuccessful()
144 static ::testing::AssertionResult IsResultFailure(CmdlineResult result, in IsResultFailure()
145 CmdlineResult::Status failure_status) { in IsResultFailure()
231 EXPECT_SINGLE_PARSE_FAIL("abcdefg^%@#*(@#", CmdlineResult::kUnknown); in TEST_F()
233 EXPECT_SINGLE_PARSE_FAIL("-Xverify:whatever", CmdlineResult::kFailure); in TEST_F()
235 EXPECT_SINGLE_PARSE_FAIL("-Xsswhatever", CmdlineResult::kFailure); // invalid memory value in TEST_F()
236 EXPECT_SINGLE_PARSE_FAIL("-Xms123", CmdlineResult::kFailure); // memory value too small in TEST_F()
237 EXPECT_SINGLE_PARSE_FAIL("-XX:HeapTargetUtilization=0.0", CmdlineResult::kOutOfRange); // toosmal in TEST_F()
238 EXPECT_SINGLE_PARSE_FAIL("-XX:HeapTargetUtilization=2.0", CmdlineResult::kOutOfRange); // toolarg in TEST_F()
239 EXPECT_SINGLE_PARSE_FAIL("-XX:ParallelGCThreads=-5", CmdlineResult::kOutOfRange); // too small in TEST_F()
[all …]
Dcmdline_parser.h446 CmdlineResult Parse(const std::string& argv) { in Parse()
454 CmdlineResult Parse(const char* argv) { in Parse()
460 CmdlineResult Parse(const std::vector<const char*>& argv) { in Parse()
466 CmdlineResult Parse(const std::vector<std::string>& argv) { in Parse()
472 CmdlineResult Parse(const char* argv[], int argc) { in Parse()
517 CmdlineResult Parse(TokenRange&& arguments_list) { in Parse()
549 return CmdlineResult(CmdlineResult::kUnknown, in Parse()
570 return CmdlineResult(CmdlineResult::kFailure, in Parse()
579 return CmdlineResult(CmdlineResult::kFailure, in Parse()
589 CmdlineResult parse_attempt = arg->ParseArgument(exact_range, &consumed_tokens); in Parse()
[all …]
DREADME.md242 When many arguments are parsed, the result is collapsed down to a `CmdlineResult` which acts as a
/art/cmdline/detail/
Dcmdline_parse_argument_detail.h57 virtual CmdlineResult ParseArgument(const TokenRange& arguments, size_t* consumed_tokens) = 0;
313 virtual CmdlineResult ParseArgument(const TokenRange& arguments, size_t* consumed_tokens) { in ParseArgument()
324 return CmdlineResult(CmdlineResult::kUnknown, "Size mismatch"); in ParseArgument()
347 return CmdlineResult(CmdlineResult::kFailure, in ParseArgument()
359 return CmdlineResult(CmdlineResult::kFailure, in ParseArgument()
382 virtual CmdlineResult ParseArgumentSingle(const std::string& argument) { in ParseArgumentSingle()
403 return CmdlineResult(CmdlineResult::kFailure, in ParseArgumentSingle()
430 return CmdlineResult(CmdlineResult::kFailure, in ParseArgumentSingle()
462 CmdlineResult raw_result = std::move(result); in ParseArgumentSingle()
487 CmdlineResult SaveArgument(const TArg& value) { in SaveArgument()
[all …]
/art/runtime/
Dparsed_options.cc445 CmdlineResult parse_result = parser->Parse(argv_list); in DoParse()
449 if (parse_result.GetStatus() == CmdlineResult::kUsage) { in DoParse()
452 } else if (parse_result.GetStatus() == CmdlineResult::kUnknown && !ignore_unrecognized) { in DoParse()