aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-03-17 10:42:21 -0700
committerGravatar GitHub <noreply@github.com>2017-03-17 10:42:20 -0700
commitc0871aa49c685e3aca19244c67d54ff321a62865 (patch)
treef19a0e32ee06bffe3951c379bffd29f3bfd61310 /src/google/protobuf/stubs
parent44dc55587ebbf79912615c8bbcd0947e7ebaa33a (diff)
parent416f90939d4de58fe1a4e2489120010313183291 (diff)
Merge pull request #2848 from xfxyjwf/freebsd
Fix freebsd build.
Diffstat (limited to 'src/google/protobuf/stubs')
-rw-r--r--src/google/protobuf/stubs/stringpiece_unittest.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/stringpiece_unittest.cc b/src/google/protobuf/stubs/stringpiece_unittest.cc
index a52d81f8..a6a87595 100644
--- a/src/google/protobuf/stubs/stringpiece_unittest.cc
+++ b/src/google/protobuf/stubs/stringpiece_unittest.cc
@@ -783,11 +783,13 @@ TEST(FindOneCharTest, EdgeCases) {
EXPECT_EQ(StringPiece::npos, a.rfind('x'));
}
+#ifdef PROTOBUF_HAS_DEATH_TEST
#ifndef NDEBUG
TEST(NonNegativeLenTest, NonNegativeLen) {
EXPECT_DEATH(StringPiece("xyz", -1), "len >= 0");
}
#endif // ndef DEBUG
+#endif // PROTOBUF_HAS_DEATH_TEST
} // namespace
} // namespace protobuf