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

Unified Diff: base/stats_table_unittest.cc

Issue 126100: Fix StatsTable::RegisterThread so that it doesn't crash if shared memory... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 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/stats_table.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/stats_table_unittest.cc
===================================================================
--- base/stats_table_unittest.cc (revision 18166)
+++ base/stats_table_unittest.cc (working copy)
@@ -39,7 +39,7 @@
// Register a single thread.
std::string thread_name = "mainThread";
int slot_id = table.RegisterThread(thread_name);
- EXPECT_TRUE(slot_id);
+ EXPECT_NE(slot_id, 0);
// Fill up the table with counters.
std::string counter_base_name = "counter";
@@ -261,9 +261,9 @@
// Test initial state.
EXPECT_TRUE(foo.Enabled());
- EXPECT_NE(foo.Pointer(), static_cast<int*>(0));
+ ASSERT_NE(foo.Pointer(), static_cast<int*>(0));
+ EXPECT_EQ(0, *(foo.Pointer()));
EXPECT_EQ(0, table.GetCounterValue("c:foo"));
- EXPECT_EQ(0, *(foo.Pointer()));
// Test Increment.
while(*(foo.Pointer()) < 123) foo.Increment();
« no previous file with comments | « base/stats_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698