MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / RecordProperty

Method RecordProperty

tests/gtest/gtest-all.cc:3554–3568  ·  view source on GitHub ↗

Adds a test property to the list. If a property with the same key as the supplied property is already represented, the value of this test_property replaces the old value for that key.

Source from the content-addressed store, hash-verified

3552// supplied property is already represented, the value of this test_property
3553// replaces the old value for that key.
3554void TestResult::RecordProperty(const std::string& xml_element,
3555 const TestProperty& test_property) {
3556 if (!ValidateTestProperty(xml_element, test_property)) {
3557 return;
3558 }
3559 internal::MutexLock lock(&test_properites_mutex_);
3560 const std::vector<TestProperty>::iterator property_with_matching_key =
3561 std::find_if(test_properties_.begin(), test_properties_.end(),
3562 internal::TestPropertyKeyIs(test_property.key()));
3563 if (property_with_matching_key == test_properties_.end()) {
3564 test_properties_.push_back(test_property);
3565 return;
3566 }
3567 property_with_matching_key->SetValue(test_property.value());
3568}
3569
3570// The list of reserved attributes used in the <testsuites> element of XML
3571// output.

Callers 1

RecordPropertyMethod · 0.45

Calls 8

TestPropertyKeyIsClass · 0.85
TestPropertyClass · 0.85
keyMethod · 0.80
SetValueMethod · 0.80
valueMethod · 0.80
GetStringMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected