Printers test: fixed compilation bug, due to unnecessary parentheses in declaration

This commit is contained in:
Philipp Paulweber 2018-07-19 12:36:47 +02:00
parent e887b03e5a
commit 1da26a77c5
No known key found for this signature in database
GPG Key ID: DAF035D73D07C984

View File

@ -572,7 +572,7 @@ struct Foo {
TEST(PrintPointerTest, MemberVariablePointer) { TEST(PrintPointerTest, MemberVariablePointer) {
EXPECT_TRUE(HasPrefix(Print(&Foo::value), EXPECT_TRUE(HasPrefix(Print(&Foo::value),
Print(sizeof(&Foo::value)) + "-byte object ")); Print(sizeof(&Foo::value)) + "-byte object "));
int (Foo::*p) = NULL; // NOLINT int Foo::*p = NULL; // NOLINT
EXPECT_TRUE(HasPrefix(Print(p), EXPECT_TRUE(HasPrefix(Print(p),
Print(sizeof(p)) + "-byte object ")); Print(sizeof(p)) + "-byte object "));
} }
@ -1250,7 +1250,7 @@ TEST(PrintReferenceTest, HandlesMemberFunctionPointer) {
// Tests that the universal printer prints a member variable pointer // Tests that the universal printer prints a member variable pointer
// passed by reference. // passed by reference.
TEST(PrintReferenceTest, HandlesMemberVariablePointer) { TEST(PrintReferenceTest, HandlesMemberVariablePointer) {
int (Foo::*p) = &Foo::value; // NOLINT int Foo::*p = &Foo::value; // NOLINT
EXPECT_TRUE(HasPrefix( EXPECT_TRUE(HasPrefix(
PrintByRef(p), PrintByRef(p),
"@" + PrintPointer(&p) + " " + Print(sizeof(p)) + "-byte object ")); "@" + PrintPointer(&p) + " " + Print(sizeof(p)) + "-byte object "));