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

Function testDefaultIntValue

tests/flags.cc:5–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <assert.h>
4
5static void testDefaultIntValue()
6{
7 FlagGroup flags;
8
9 IntFlag intFlag({"--intFlag"}, "a global integer flag", 1);
10
11 intFlag.setDefaultValue(2);
12 const char* argv[] = {"prog", NULL};
13 flags.parseFlags(1, argv);
14 assert(intFlag.get() == 2);
15}
16
17static void testOverriddenIntValue()
18{

Callers 1

mainFunction · 0.85

Calls 3

setDefaultValueMethod · 0.80
parseFlagsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected