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

Unified Diff: base/trace_event/memory_profiler_allocation_register_unittest.cc

Issue 1427953002: [Tracing] Remove fields from AllocationContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add initializers to test to make MSVC happy Created 5 years, 2 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 | « base/trace_event/memory_profiler_allocation_context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_profiler_allocation_register_unittest.cc
diff --git a/base/trace_event/memory_profiler_allocation_register_unittest.cc b/base/trace_event/memory_profiler_allocation_register_unittest.cc
index 0c976c467ccdcb31ca8954896f2ae6d2a954fbbf..bb5aeb34da92fcdd8e268626a483de587b1e8376 100644
--- a/base/trace_event/memory_profiler_allocation_register_unittest.cc
+++ b/base/trace_event/memory_profiler_allocation_register_unittest.cc
@@ -50,7 +50,7 @@ size_t SumAllSizes(const AllocationRegister& reg) {
TEST_F(AllocationRegisterTest, InsertRemove) {
AllocationRegister reg;
- AllocationContext ctx;
+ AllocationContext ctx = {};
EXPECT_EQ(0u, OrAllAddresses(reg));
@@ -81,7 +81,7 @@ TEST_F(AllocationRegisterTest, InsertRemove) {
TEST_F(AllocationRegisterTest, DoubleFreeIsAllowed) {
AllocationRegister reg;
- AllocationContext ctx;
+ AllocationContext ctx = {};
reg.Insert(reinterpret_cast<void*>(1), 0, ctx);
reg.Insert(reinterpret_cast<void*>(2), 0, ctx);
@@ -96,7 +96,7 @@ TEST_F(AllocationRegisterTest, DoubleInsertOverwrites) {
// TODO(ruuda): Although double insert happens in practice, it should not.
// Find out the cause and ban double insert if possible.
AllocationRegister reg;
- AllocationContext ctx;
+ AllocationContext ctx = {};
StackFrame frame1 = "Foo";
StackFrame frame2 = "Bar";
@@ -124,7 +124,7 @@ TEST_F(AllocationRegisterTest, DoubleInsertOverwrites) {
TEST_F(AllocationRegisterTest, InsertRemoveCollisions) {
size_t expected_sum = 0;
AllocationRegister reg;
- AllocationContext ctx;
+ AllocationContext ctx = {};
// By inserting 100 more entries than the number of buckets, there will be at
// least 100 collisions.
@@ -161,7 +161,7 @@ TEST_F(AllocationRegisterTest, InsertRemoveCollisions) {
TEST_F(AllocationRegisterTest, InsertRemoveRandomOrder) {
size_t expected_sum = 0;
AllocationRegister reg;
- AllocationContext ctx;
+ AllocationContext ctx = {};
uintptr_t generator = 3;
uintptr_t prime = 1013;
@@ -203,7 +203,7 @@ TEST_F(AllocationRegisterTest, InsertRemoveRandomOrder) {
#if GTEST_HAS_DEATH_TEST
TEST_F(AllocationRegisterTest, OverflowDeathTest) {
AllocationRegister reg;
- AllocationContext ctx;
+ AllocationContext ctx = {};
uintptr_t i;
// Fill up all of the memory allocated for the register. |kNumCells| minus 1
« no previous file with comments | « base/trace_event/memory_profiler_allocation_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698