MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / TEST

Function TEST

src/tests/unit/configfileparser.cpp:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35//
36
37TEST(OptionMapEntry, stringstream_string)
38{
39 OptionMapEntry t1_str{"cmdline",
40 "command_line",
41 "Simple Description",
42 OptionValueType::String};
43 std::stringstream t1_test;
44 t1_test << t1_str;
45 std::string t1_expect{""};
46 ASSERT_EQ(t1_test.str(), t1_expect) << "Unset value failed";
47
48 t1_str.value = "Test Value";
49 ASSERT_EQ(t1_test.str(), t1_expect) << "Value set, incorrect present value failed";
50
51 t1_str.present = true;
52 std::string t1_test2{"Simple Description: Test Value\n"};
53 ASSERT_EQ(t1_test.str(), t1_expect) << "Incorrect value rendering";
54}
55
56
57TEST(OptionMapEntry, stringstream_integer)

Callers

nothing calls this directly

Calls 1

strMethod · 0.45

Tested by

no test coverage detected