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

Function checkAttributes

plugins/esi/test/utils_test.cc:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35using namespace EsiLib;
36
37void
38checkAttributes(const char *check_id, const AttributeList &attr_list, const char *attr_info[])
39{
40 cout << check_id << ": checking attributes" << endl;
41 AttributeList::const_iterator iter = attr_list.begin();
42 for (int i = 0; attr_info[i]; i += 2, ++iter) {
43 REQUIRE(iter->name_len == static_cast<int>(strlen(attr_info[i])));
44 REQUIRE(strncmp(iter->name, attr_info[i], iter->name_len) == 0);
45 REQUIRE(iter->value_len == static_cast<int>(strlen(attr_info[i + 1])));
46 REQUIRE(strncmp(iter->value, attr_info[i + 1], iter->value_len) == 0);
47 }
48 REQUIRE(iter == attr_list.end());
49}
50
51TEST_CASE("esi utils test")
52{

Callers 1

utils_test.ccFile · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected