| Index: net/spdy/array_output_buffer_test.cc
|
| diff --git a/net/spdy/array_output_buffer_test.cc b/net/spdy/array_output_buffer_test.cc
|
| deleted file mode 100644
|
| index 4dedce7fca40c40ca7ff4f4db5443b6955e28c7c..0000000000000000000000000000000000000000
|
| --- a/net/spdy/array_output_buffer_test.cc
|
| +++ /dev/null
|
| @@ -1,49 +0,0 @@
|
| -// Copyright 2017 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "net/spdy/array_output_buffer.h"
|
| -
|
| -#include "testing/gtest/include/gtest/gtest.h"
|
| -
|
| -namespace net {
|
| -namespace test {
|
| -
|
| -// This test verifies that ArrayOutputBuffer is initialized properly.
|
| -TEST(ArrayOutputBufferTest, InitializedFromArray) {
|
| - char array[100];
|
| - ArrayOutputBuffer buffer(array, sizeof(array));
|
| - EXPECT_EQ(sizeof(array), buffer.BytesFree());
|
| - EXPECT_EQ((uint64_t)0, buffer.Size());
|
| - EXPECT_EQ(array, buffer.Begin());
|
| -}
|
| -
|
| -// This test verifies that Reset() causes an ArrayOutputBuffer's capacity and
|
| -// size to be reset to the initial state.
|
| -TEST(ArrayOutputBufferTest, WriteAndReset) {
|
| - char array[100];
|
| - ArrayOutputBuffer buffer(array, sizeof(array));
|
| -
|
| - // Let's write some bytes.
|
| - char* dst;
|
| - int size;
|
| - buffer.Next(&dst, &size);
|
| - ASSERT_GT(size, 1);
|
| - ASSERT_NE(nullptr, dst);
|
| - const int64_t written = size / 2;
|
| - memset(dst, 'x', written);
|
| - buffer.AdvanceWritePtr(written);
|
| -
|
| - // The buffer should be partially used.
|
| - EXPECT_EQ((uint64_t)size - written, buffer.BytesFree());
|
| - EXPECT_EQ((uint64_t)written, buffer.Size());
|
| -
|
| - buffer.Reset();
|
| -
|
| - // After a reset, the buffer should regain its full capacity.
|
| - EXPECT_EQ(sizeof(array), buffer.BytesFree());
|
| - EXPECT_EQ((uint64_t)0, buffer.Size());
|
| -}
|
| -
|
| -} // namespace test
|
| -} // namespace net
|
|
|