MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / testOverriddenIntValue

Function testOverriddenIntValue

tests/flags.cc:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17static void testOverriddenIntValue()
18{
19 FlagGroup flags;
20
21 IntFlag intFlag({"--intFlag"}, "a global integer flag", 1);
22
23 intFlag.setDefaultValue(2);
24 const char* argv[] = {"prog", "--intFlag=3"};
25 flags.parseFlags(2, argv);
26 assert(intFlag.get() == 3);
27}
28
29int main(int argc, const char* argv[])
30{

Callers 1

mainFunction · 0.85

Calls 3

setDefaultValueMethod · 0.80
parseFlagsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected