MCPcopy Create free account
hub / github.com/aseprite/laf / TEST

Function TEST

base/program_options_tests.cpp:13–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11using namespace base;
12
13TEST(ProgramOptions, OptionMembers)
14{
15 ProgramOptions po;
16 ProgramOptions::Option& help = po.add("help").mnemonic('h').description("Show the help");
17 ProgramOptions::Option& output = po.add("output").mnemonic('O').requiresValue("OUTPUT");
18
19 EXPECT_EQ("help", help.name());
20 EXPECT_EQ("Show the help", help.description());
21 EXPECT_EQ('h', help.mnemonic());
22 EXPECT_FALSE(po.enabled(help));
23 EXPECT_FALSE(help.doesRequireValue());
24
25 EXPECT_EQ("output", output.name());
26 EXPECT_EQ("", output.description());
27 EXPECT_EQ('O', output.mnemonic());
28 EXPECT_FALSE(po.enabled(output));
29 EXPECT_TRUE(output.doesRequireValue());
30}
31
32TEST(ProgramOptions, Reset)
33{

Callers

nothing calls this directly

Calls 10

mnemonicMethod · 0.80
enabledMethod · 0.80
doesRequireValueMethod · 0.80
value_ofMethod · 0.80
parseMethod · 0.80
optionMethod · 0.80
valueMethod · 0.80
addMethod · 0.45
resetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected