summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 20:33:17 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 20:33:17 +0000
commit74543ad3c5d278fab5c7278f7d2b27aaf4a9afc5 (patch)
treedcb813db911cfe196b7d18cf5f93f8f2174608a5 /ui
parentc248d0c8633093e2151d6c7599ce4da957acb58b (diff)
downloadchromium_src-74543ad3c5d278fab5c7278f7d2b27aaf4a9afc5.zip
chromium_src-74543ad3c5d278fab5c7278f7d2b27aaf4a9afc5.tar.gz
chromium_src-74543ad3c5d278fab5c7278f7d2b27aaf4a9afc5.tar.bz2
ui/base/models: Switch to ASSERT_* instead of EXPECT_* in tree_node_model_unittest.cc
First reason is because doesn't make sense to continue when the assertions in question fails. Second reason is because we are already using more ASSERT_* checks than EXPECT_*. So this change makes everything using ASSERT_* rather than EXPECT_*. BUG=None TEST=ui_unittests --gtest_filter=TreeNodeModelTest.* R=sky@chromium.org Review URL: http://codereview.chromium.org/7187016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/models/tree_node_model_unittest.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/ui/base/models/tree_node_model_unittest.cc b/ui/base/models/tree_node_model_unittest.cc
index a9a4ac7..cbf889a 100644
--- a/ui/base/models/tree_node_model_unittest.cc
+++ b/ui/base/models/tree_node_model_unittest.cc
@@ -292,41 +292,41 @@ TEST_F(TreeNodeModelTest, SetTitle) {
const string16 title(ASCIIToUTF16("root2"));
model.SetTitle(root, title);
AssertObserverCount(0, 0, 1);
- EXPECT_EQ(title, root->GetTitle());
+ ASSERT_EQ(title, root->GetTitle());
}
TEST_F(TreeNodeModelTest, BasicOperations) {
TreeNodeWithValue<int>* root = new TreeNodeWithValue<int>(0);
- EXPECT_EQ(0, root->child_count());
+ ASSERT_EQ(0, root->child_count());
TreeNodeWithValue<int>* child1 = new TreeNodeWithValue<int>(1);
root->Add(child1, root->child_count());
- EXPECT_EQ(1, root->child_count());
- EXPECT_EQ(root, child1->parent());
+ ASSERT_EQ(1, root->child_count());
+ ASSERT_EQ(root, child1->parent());
TreeNodeWithValue<int>* child2 = new TreeNodeWithValue<int>(1);
root->Add(child2, root->child_count());
- EXPECT_EQ(2, root->child_count());
- EXPECT_EQ(child1->parent(), child2->parent());
+ ASSERT_EQ(2, root->child_count());
+ ASSERT_EQ(child1->parent(), child2->parent());
root->Remove(child2);
- EXPECT_EQ(1, root->child_count());
- EXPECT_EQ(NULL, child2->parent());
+ ASSERT_EQ(1, root->child_count());
+ ASSERT_EQ(NULL, child2->parent());
delete child2;
delete root->Remove(child1);
- EXPECT_EQ(0, root->child_count());
+ ASSERT_EQ(0, root->child_count());
delete root;
}
TEST_F(TreeNodeModelTest, IsRoot) {
TreeNodeWithValue<int> root;
- EXPECT_TRUE(root.is_root());
+ ASSERT_TRUE(root.is_root());
TreeNodeWithValue<int>* child1 = new TreeNodeWithValue<int>(1);
root.Add(child1, root.child_count());
- EXPECT_FALSE(child1->is_root());
+ ASSERT_FALSE(child1->is_root());
}
} // namespace ui