aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/arena_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/arena_unittest.cc')
-rw-r--r--src/google/protobuf/arena_unittest.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/google/protobuf/arena_unittest.cc b/src/google/protobuf/arena_unittest.cc
index b9dd8b98..307c0905 100644
--- a/src/google/protobuf/arena_unittest.cc
+++ b/src/google/protobuf/arena_unittest.cc
@@ -1232,11 +1232,11 @@ TEST(ArenaTest, ArenaHooksSanity) {
EXPECT_EQ(1, ArenaHooksTestUtil::num_init);
EXPECT_EQ(0, ArenaHooksTestUtil::num_allocations);
::google::protobuf::Arena::Create<uint64>(&arena);
-#ifdef _WIN32
- EXPECT_EQ(2, ArenaHooksTestUtil::num_allocations);
-#else
- EXPECT_EQ(1, ArenaHooksTestUtil::num_allocations);
-#endif
+ if (::google::protobuf::internal::has_trivial_destructor<uint64>::value) {
+ EXPECT_EQ(1, ArenaHooksTestUtil::num_allocations);
+ } else {
+ EXPECT_EQ(2, ArenaHooksTestUtil::num_allocations);
+ }
arena.Reset();
arena.Reset();
EXPECT_EQ(2, ArenaHooksTestUtil::num_reset);