diff options
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_unittest.cc')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_unittest.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.cc b/src/google/protobuf/compiler/cpp/cpp_unittest.cc index 41ba5e43..a950583e 100644 --- a/src/google/protobuf/compiler/cpp/cpp_unittest.cc +++ b/src/google/protobuf/compiler/cpp/cpp_unittest.cc @@ -853,14 +853,14 @@ TEST(GeneratedEnumTest, MinAndMax) { EXPECT_EQ(12589235, unittest::TestSparseEnum_ARRAYSIZE); // Make sure we can take the address of _MIN, _MAX and _ARRAYSIZE. - void* nullptr = 0; // NULL may be integer-type, not pointer-type. - EXPECT_NE(nullptr, &unittest::TestAllTypes::NestedEnum_MIN); - EXPECT_NE(nullptr, &unittest::TestAllTypes::NestedEnum_MAX); - EXPECT_NE(nullptr, &unittest::TestAllTypes::NestedEnum_ARRAYSIZE); - - EXPECT_NE(nullptr, &unittest::ForeignEnum_MIN); - EXPECT_NE(nullptr, &unittest::ForeignEnum_MAX); - EXPECT_NE(nullptr, &unittest::ForeignEnum_ARRAYSIZE); + void* null_pointer = 0; // NULL may be integer-type, not pointer-type. + EXPECT_NE(null_pointer, &unittest::TestAllTypes::NestedEnum_MIN); + EXPECT_NE(null_pointer, &unittest::TestAllTypes::NestedEnum_MAX); + EXPECT_NE(null_pointer, &unittest::TestAllTypes::NestedEnum_ARRAYSIZE); + + EXPECT_NE(null_pointer, &unittest::ForeignEnum_MIN); + EXPECT_NE(null_pointer, &unittest::ForeignEnum_MAX); + EXPECT_NE(null_pointer, &unittest::ForeignEnum_ARRAYSIZE); // Make sure we can use _MIN, _MAX and _ARRAYSIZE as switch cases. switch (unittest::SPARSE_A) { |