MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / TEST

Function TEST

src/base/program_options_tests.cpp:13–32  ·  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 =
17 po.add("help").mnemonic('h').description("Show the help");
18 ProgramOptions::Option& output =
19 po.add("output").mnemonic('O').requiresValue("OUTPUT");
20
21 EXPECT_EQ("help", help.name());
22 EXPECT_EQ("Show the help", help.description());
23 EXPECT_EQ('h', help.mnemonic());
24 EXPECT_FALSE(po.enabled(help));
25 EXPECT_FALSE(help.doesRequireValue());
26
27 EXPECT_EQ("output", output.name());
28 EXPECT_EQ("", output.description());
29 EXPECT_EQ('O', output.mnemonic());
30 EXPECT_FALSE(po.enabled(output));
31 EXPECT_TRUE(output.doesRequireValue());
32}
33
34TEST(ProgramOptions, Reset)
35{

Callers

nothing calls this directly

Calls 11

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

Tested by

no test coverage detected