MCPcopy Create free account
hub / github.com/ElementsProject/elements / BOOST_FIXTURE_TEST_CASE

Function BOOST_FIXTURE_TEST_CASE

src/test/util_tests.cpp:344–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342};
343
344BOOST_FIXTURE_TEST_CASE(util_CheckValue, CheckValueTest)
345{
346 using M = ArgsManager;
347
348 CheckValue(M::ALLOW_ANY, nullptr, Expect{{}}.DefaultString().DefaultInt().DefaultBool().List({}));
349 CheckValue(M::ALLOW_ANY, "-novalue", Expect{false}.String("0").Int(0).Bool(false).List({}));
350 CheckValue(M::ALLOW_ANY, "-novalue=", Expect{false}.String("0").Int(0).Bool(false).List({}));
351 CheckValue(M::ALLOW_ANY, "-novalue=0", Expect{true}.String("1").Int(1).Bool(true).List({"1"}));
352 CheckValue(M::ALLOW_ANY, "-novalue=1", Expect{false}.String("0").Int(0).Bool(false).List({}));
353 CheckValue(M::ALLOW_ANY, "-novalue=2", Expect{false}.String("0").Int(0).Bool(false).List({}));
354 CheckValue(M::ALLOW_ANY, "-novalue=abc", Expect{true}.String("1").Int(1).Bool(true).List({"1"}));
355 CheckValue(M::ALLOW_ANY, "-value", Expect{""}.String("").Int(0).Bool(true).List({""}));
356 CheckValue(M::ALLOW_ANY, "-value=", Expect{""}.String("").Int(0).Bool(true).List({""}));
357 CheckValue(M::ALLOW_ANY, "-value=0", Expect{"0"}.String("0").Int(0).Bool(false).List({"0"}));
358 CheckValue(M::ALLOW_ANY, "-value=1", Expect{"1"}.String("1").Int(1).Bool(true).List({"1"}));
359 CheckValue(M::ALLOW_ANY, "-value=2", Expect{"2"}.String("2").Int(2).Bool(true).List({"2"}));
360 CheckValue(M::ALLOW_ANY, "-value=abc", Expect{"abc"}.String("abc").Int(0).Bool(false).List({"abc"}));
361}
362
363struct NoIncludeConfTest {
364 std::string Parse(const char* arg)

Callers

nothing calls this directly

Calls 15

ParseFunction · 0.85
fopenFunction · 0.85
MakeUCharSpanFunction · 0.85
AddArgMethod · 0.80
SetNetworkOnlyArgMethod · 0.80
ParseParametersMethod · 0.80
ReadConfigStreamMethod · 0.80
SoftSetArgMethod · 0.80
ForceSetArgMethod · 0.80
IsArgSetMethod · 0.80
IsArgNegatedMethod · 0.80
GetArgMethod · 0.80

Tested by

no test coverage detected