Adds a failure if the key is a reserved attribute of Google Test testcase tags. Returns true if the property is valid.
| 3132 | // Adds a failure if the key is a reserved attribute of Google Test |
| 3133 | // testcase tags. Returns true if the property is valid. |
| 3134 | bool TestResult::ValidateTestProperty(const TestProperty& test_property) { |
| 3135 | internal::String key(test_property.key()); |
| 3136 | if (key == "name" || key == "status" || key == "time" || key == "classname") { |
| 3137 | ADD_FAILURE() |
| 3138 | << "Reserved key used in RecordProperty(): " |
| 3139 | << key |
| 3140 | << " ('name', 'status', 'time', and 'classname' are reserved by " |
| 3141 | << GTEST_NAME_ << ")"; |
| 3142 | return false; |
| 3143 | } |
| 3144 | return true; |
| 3145 | } |
| 3146 | |
| 3147 | // Clears the object. |
| 3148 | void TestResult::Clear() { |