aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/stringpiece_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/stringpiece_unittest.cc')
-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