MCPcopy Create free account
hub / github.com/apache/mesos / getArgv

Function getArgv

3rdparty/stout/tests/subcommand_tests.cpp:96–106  ·  view source on GitHub ↗

Generates a vector of arguments from flags.

Source from the content-addressed store, hash-verified

94
95// Generates a vector of arguments from flags.
96static vector<string> getArgv(const flags::FlagsBase& flags)
97{
98 vector<string> argv;
99 foreachpair (const string& name, const flags::Flag& flag, flags) {
100 Option<string> value = flag.stringify(flags);
101 if (value.isSome()) {
102 argv.push_back("--" + name + "=" + value.get());
103 }
104 }
105 return argv;
106}
107
108
109TEST(SubcommandTest, Flags)

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected