forked from OSchip/llvm-project
[clang-tidy] Restore test parameter operator<< function (NFC)
Clang erroneously flagged the function as "unused", but it is most definitely used by gtest to pretty print the parameter value when a test fails. Make the pretty printing function a friend function in the parameter class similar to other clang unit tests.
This commit is contained in:
parent
6e8ad98446
commit
9d99cf59a1
|
@ -48,6 +48,11 @@ namespace {
|
|||
struct Param {
|
||||
bool Matched;
|
||||
const char *Text;
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &Str, const Param &Value) {
|
||||
return Str << "Matched: " << std::boolalpha << Value.Matched << ", Text: '"
|
||||
<< Value.Text << "'";
|
||||
}
|
||||
};
|
||||
|
||||
class MatcherTest : public ::testing::TestWithParam<Param> {};
|
||||
|
|
Loading…
Reference in New Issue