summaryrefslogtreecommitdiffstats
path: root/chrome/browser/password_manager
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-23 18:15:56 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-23 18:15:56 +0000
commit8c79a92fdab8c6f19b52da63128274a78fa0611e (patch)
treee9210c952a3151308de6b9bab40e43674fa78590 /chrome/browser/password_manager
parent3a5ed42ebab71e2171e8a5b11d3c8d34c0a324f1 (diff)
downloadchromium_src-8c79a92fdab8c6f19b52da63128274a78fa0611e.zip
chromium_src-8c79a92fdab8c6f19b52da63128274a78fa0611e.tar.gz
chromium_src-8c79a92fdab8c6f19b52da63128274a78fa0611e.tar.bz2
ui/base/models: Replace ASSERT_* checks by EXPECT_* in TreeNode unittests.
It turns out that we generally should use EXPECT, and only switch to ASSERT when the test would otherwise crash. An example when to use ASSERT is: - When going to manipulate a returned pointer value, we should ASSERT at some point that the pointer is non-NULL. Another example is: - If you are going to check the values in an array, you ASSERT on the size of the array. I.e, the array should contain 3 elements, because you are going to access the third element at index 2, if the array doesn't contain 3 elements, the test will crash, so you should ASSERT before trying to access the element instead of EXPECT because you want to abort the test instead of crashing the entire binary. And in the cases here, we don't have these situations and the individual test expectations are not linked, so we are better using EXPECT than ASSERT everywhere. BUG=None TEST=ui_unittests --gtest_filter=TreeNodeModelTest.* R=phajdan.jr@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7243005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90234 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/password_manager')
0 files changed, 0 insertions, 0 deletions