MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / ManySubcommands

Class ManySubcommands

tests/SubcommandTest.cpp:1258–1276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256}
1257
1258struct ManySubcommands : public TApp {
1259
1260 CLI::App *sub1{nullptr};
1261 CLI::App *sub2{nullptr};
1262 CLI::App *sub3{nullptr};
1263 CLI::App *sub4{nullptr};
1264
1265 ManySubcommands() {
1266 app.allow_extras();
1267 sub1 = app.add_subcommand("sub1");
1268 sub2 = app.add_subcommand("sub2");
1269 sub3 = app.add_subcommand("sub3");
1270 sub4 = app.add_subcommand("sub4");
1271 args = {"sub1", "sub2", "sub3"};
1272 }
1273
1274 ManySubcommands(const ManySubcommands &) = delete;
1275 ManySubcommands &operator=(const ManySubcommands &) = delete;
1276};
1277
1278TEST_CASE_METHOD(ManySubcommands, "Required1Exact", "[subcom]") {
1279 app.require_subcommand(1);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected