MCPcopy Create free account
hub / github.com/apache/singa / ValidateTestPropertyName

Function ValidateTestPropertyName

test/gtest/gtest-all.cc:3302–3312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3300}
3301
3302bool ValidateTestPropertyName(const std::string& property_name,
3303 const std::vector<std::string>& reserved_names) {
3304 if (std::find(reserved_names.begin(), reserved_names.end(), property_name) !=
3305 reserved_names.end()) {
3306 ADD_FAILURE() << "Reserved key used in RecordProperty(): " << property_name
3307 << " (" << FormatWordList(reserved_names)
3308 << " are reserved by " << GTEST_NAME_ << ")";
3309 return false;
3310 }
3311 return true;
3312}
3313
3314// Adds a failure if the key is a reserved attribute of the element named
3315// xml_element. Returns true if the property is valid.

Callers 1

ValidateTestPropertyMethod · 0.85

Calls 3

FormatWordListFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected