MCPcopy Create free account
hub / github.com/apache/trafficserver / test

Function test

src/proxy/http/unit_tests/test_ForwardedConfig.cc:94–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92};
93
94void
95test(const char *spec, const char *reqErr, const OptionBitSet &bS)
96{
97 swoc::LocalBufferWriter<1024> error;
98
99 error << "cheese";
100
101 REQUIRE(bS == optStrToBitset(XS(spec), error));
102 std::size_t len = std::strlen(reqErr);
103 REQUIRE((error.size() - sizeof("cheese") + 1) == len);
104 REQUIRE(std::memcmp(error.data() + sizeof("cheese") - 1, reqErr, len) == 0);
105}
106
107} // namespace
108

Callers 1

Calls 5

optStrToBitsetFunction · 0.85
XSClass · 0.85
memcmpFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected