Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: webrtc/base/buffer_unittest.cc

Issue 1785713005: Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Feedback from tommi. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/buffer.cc ('k') | webrtc/base/copyonwritebuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/buffer_unittest.cc
diff --git a/webrtc/base/buffer_unittest.cc b/webrtc/base/buffer_unittest.cc
index 80d26927a227c91d24ee07e389c55c9e1691e6ba..20b09757e1295e2f68b2473687e32f4b36f1fd79 100644
--- a/webrtc/base/buffer_unittest.cc
+++ b/webrtc/base/buffer_unittest.cc
@@ -64,23 +64,6 @@ TEST(BufferTest, TestConstructArray) {
EXPECT_EQ(0, memcmp(buf.data(), kTestData, 16));
}
-TEST(BufferTest, TestConstructCopy) {
- Buffer buf1(kTestData), buf2(buf1);
- EXPECT_EQ(buf2.size(), 16u);
- EXPECT_EQ(buf2.capacity(), 16u);
- EXPECT_EQ(0, memcmp(buf2.data(), kTestData, 16));
- EXPECT_NE(buf1.data(), buf2.data());
- EXPECT_EQ(buf1, buf2);
-}
-
-TEST(BufferTest, TestAssign) {
- Buffer buf1, buf2(kTestData, sizeof(kTestData), 256);
- EXPECT_NE(buf1, buf2);
- buf1 = buf2;
- EXPECT_EQ(buf1, buf2);
- EXPECT_NE(buf1.data(), buf2.data());
-}
-
TEST(BufferTest, TestSetData) {
Buffer buf(kTestData + 4, 7);
buf.SetData(kTestData, 9);
« no previous file with comments | « webrtc/base/buffer.cc ('k') | webrtc/base/copyonwritebuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698