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

Function TEST_F

src/tests/unit/core-extensions.cpp:148–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146};
147
148TEST_F(AccessServerMetaOpts, parse_meta)
149{
150 for (const auto &tc : GetMustFindOptions())
151 {
152 Option opt = options.get(tc.key);
153
154 EXPECT_STREQ(tc.key.c_str(), opt.get(0, 64).c_str());
155 EXPECT_STREQ(tc.value.c_str(), opt.get(1, 64).c_str());
156 }
157
158 // All meta variabibles will be visible in the openvpn::OptionList
159 // class (which OptionListJSON extends). Check that all of them
160 // are present
161 for (const auto &key : GetIgnoredOptions())
162 {
163 const Option *opt = options.get_ptr(key);
164 EXPECT_NE(opt, (Option *)NULL)
165 << "Option '" << key << "'"
166 << " was not found in the parsed OptionListJSON object";
167 }
168}
169
170TEST_F(AccessServerMetaOpts, json_export)
171{

Callers

nothing calls this directly

Calls 3

json_exportMethod · 0.80
string_exportMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected