summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 23:50:10 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 23:50:10 +0000
commit351631b199be296f6e6193312b4393a40b0e3b4c (patch)
tree78a8e2dfc6b506b273e340381996c5ac3e81aa5a
parent1ebf6419a109091a5c4f8827ea838d09a59b9d34 (diff)
downloadchromium_src-351631b199be296f6e6193312b4393a40b0e3b4c.zip
chromium_src-351631b199be296f6e6193312b4393a40b0e3b4c.tar.gz
chromium_src-351631b199be296f6e6193312b4393a40b0e3b4c.tar.bz2
ui/base/models: Change the remaining ASSERT_EQ to EXPECT_EQ in TreeNodeModel unittests.
Also rename AssertObserverCount to ExpectCountsEqual. BUG=None TEST=ui_unittests --gtest_filter=TreeNodeModelTest.* R=sky@chromium.org Review URL: http://codereview.chromium.org/7468004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93288 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/base/models/tree_node_model_unittest.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/ui/base/models/tree_node_model_unittest.cc b/ui/base/models/tree_node_model_unittest.cc
index 2f5e637..265f951 100644
--- a/ui/base/models/tree_node_model_unittest.cc
+++ b/ui/base/models/tree_node_model_unittest.cc
@@ -19,12 +19,12 @@ class TreeNodeModelTest : public testing::Test, public TreeModelObserver {
removed_count_(0),
changed_count_(0) {}
- void AssertObserverCount(int added_count,
- int removed_count,
- int changed_count) {
- ASSERT_EQ(added_count, added_count_);
- ASSERT_EQ(removed_count, removed_count_);
- ASSERT_EQ(changed_count, changed_count_);
+ void ExpectCountsEqual(int added_count,
+ int removed_count,
+ int changed_count) {
+ EXPECT_EQ(added_count, added_count_);
+ EXPECT_EQ(removed_count, removed_count_);
+ EXPECT_EQ(changed_count, changed_count_);
}
void ClearCounts() {
@@ -76,7 +76,7 @@ TEST_F(TreeNodeModelTest, AddNode) {
TestNode* child1 = new TestNode;
model.Add(root, child1, 0);
- AssertObserverCount(1, 0, 0);
+ ExpectCountsEqual(1, 0, 0);
for (int i = 0; i < 2; ++i)
child1->Add(new TestNode, i);
@@ -84,7 +84,7 @@ TEST_F(TreeNodeModelTest, AddNode) {
TestNode* child2 = new TestNode;
model.Add(root, child2, 1);
- AssertObserverCount(2, 0, 0);
+ ExpectCountsEqual(2, 0, 0);
EXPECT_EQ(2, root->child_count());
EXPECT_EQ(2, child1->child_count());
@@ -106,7 +106,7 @@ TEST_F(TreeNodeModelTest, RemoveNode) {
// Now remove |child1| from |root| and release the memory.
delete model.Remove(root, child1);
- AssertObserverCount(0, 1, 0);
+ ExpectCountsEqual(0, 1, 0);
EXPECT_EQ(0, model.GetChildCount(root));
}
@@ -287,7 +287,7 @@ TEST_F(TreeNodeModelTest, SetTitle) {
const string16 title(ASCIIToUTF16("root2"));
model.SetTitle(root, title);
- AssertObserverCount(0, 0, 1);
+ ExpectCountsEqual(0, 0, 1);
EXPECT_EQ(title, root->GetTitle());
}