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

Side by Side Diff: net/quic/core/quic_arena_scoped_ptr_test.cc

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_arena_scoped_ptr.h ('k') | net/quic/core/quic_bandwidth.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #include "net/quic/quic_arena_scoped_ptr.h" 4 #include "net/quic/core/quic_arena_scoped_ptr.h"
5 5
6 #include "net/quic/quic_one_block_arena.h" 6 #include "net/quic/core/quic_one_block_arena.h"
7 #include "testing/gmock/include/gmock/gmock.h" 7 #include "testing/gmock/include/gmock/gmock.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace net { 10 namespace net {
11 namespace { 11 namespace {
12 12
13 enum class TestParam { kFromHeap, kFromArena }; 13 enum class TestParam { kFromHeap, kFromArena };
14 14
15 struct TestObject { 15 struct TestObject {
16 explicit TestObject(uintptr_t value) : value(value) { buffer.resize(1024); } 16 explicit TestObject(uintptr_t value) : value(value) { buffer.resize(1024); }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 TEST_P(QuicArenaScopedPtrParamTest, Swap) { 93 TEST_P(QuicArenaScopedPtrParamTest, Swap) {
94 QuicArenaScopedPtr<TestObject> ptr1 = CreateObject(12345); 94 QuicArenaScopedPtr<TestObject> ptr1 = CreateObject(12345);
95 QuicArenaScopedPtr<TestObject> ptr2 = CreateObject(54321); 95 QuicArenaScopedPtr<TestObject> ptr2 = CreateObject(54321);
96 ptr1.swap(ptr2); 96 ptr1.swap(ptr2);
97 EXPECT_EQ(12345u, ptr2->value); 97 EXPECT_EQ(12345u, ptr2->value);
98 EXPECT_EQ(54321u, ptr1->value); 98 EXPECT_EQ(54321u, ptr1->value);
99 } 99 }
100 100
101 } // namespace 101 } // namespace
102 } // namespace net 102 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_arena_scoped_ptr.h ('k') | net/quic/core/quic_bandwidth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698