aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/io/coded_stream_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/io/coded_stream_unittest.cc')
-rw-r--r--src/google/protobuf/io/coded_stream_unittest.cc33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/google/protobuf/io/coded_stream_unittest.cc b/src/google/protobuf/io/coded_stream_unittest.cc
index 31574d5b..96f91ae9 100644
--- a/src/google/protobuf/io/coded_stream_unittest.cc
+++ b/src/google/protobuf/io/coded_stream_unittest.cc
@@ -63,6 +63,7 @@ namespace protobuf {
namespace io {
namespace {
+
// ===================================================================
// Data-Driven Test Infrastructure
@@ -1296,35 +1297,6 @@ void CodedStreamTest::SetupTotalBytesLimitWarningTest(
*out_warnings = scoped_log.GetMessages(WARNING);
}
-TEST_F(CodedStreamTest, TotalBytesLimitWarning) {
- std::vector<string> errors;
- std::vector<string> warnings;
- SetupTotalBytesLimitWarningTest(10240, 1024, &errors, &warnings);
-
- EXPECT_EQ(0, errors.size());
-
- EXPECT_EQ(1, warnings.size());
- EXPECT_PRED_FORMAT2(testing::IsSubstring,
- "The total number of bytes read was 2048",
- warnings[0]);
-}
-
-TEST_F(CodedStreamTest, TotalBytesLimitWarningDisabled) {
- std::vector<string> errors;
- std::vector<string> warnings;
-
- // Test with -1
- SetupTotalBytesLimitWarningTest(10240, -1, &errors, &warnings);
- EXPECT_EQ(0, errors.size());
- EXPECT_EQ(0, warnings.size());
-
- // Test again with -2, expecting the same result
- SetupTotalBytesLimitWarningTest(10240, -2, &errors, &warnings);
- EXPECT_EQ(0, errors.size());
- EXPECT_EQ(0, warnings.size());
-}
-
-
TEST_F(CodedStreamTest, RecursionLimit) {
ArrayInputStream input(buffer_, sizeof(buffer_));
CodedInputStream coded_input(&input);
@@ -1425,9 +1397,6 @@ TEST_F(CodedStreamTest, InputOver2G) {
EXPECT_EQ(0, errors.size());
}
-// ===================================================================
-
-
} // namespace
} // namespace io
} // namespace protobuf