diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-10-13 13:24:50 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-10-14 10:57:25 +0000 |
commit | af3d4809763ef308f08ced947a73b624729ac7ea (patch) | |
tree | 4402b911e30383f6c6dace1e8cf3b8e85355db3a /chromium/base/logging_unittest.cc | |
parent | 0e8ff63a407fe323e215bb1a2c423c09a4747c8a (diff) |
BASELINE: Update Chromium to 47.0.2526.14
Also adding in sources needed for spellchecking.
Change-Id: Idd44170fa1616f26315188970a8d5ba7d472b18a
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/base/logging_unittest.cc')
-rw-r--r-- | chromium/base/logging_unittest.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chromium/base/logging_unittest.cc b/chromium/base/logging_unittest.cc index 8b9701a545f..e0619425f75 100644 --- a/chromium/base/logging_unittest.cc +++ b/chromium/base/logging_unittest.cc @@ -234,6 +234,30 @@ TEST_F(LoggingTest, DcheckReleaseBehavior) { DCHECK_EQ(some_variable, 1) << "test"; } +TEST_F(LoggingTest, DCheckEqStatements) { + bool reached = false; + if (false) + DCHECK_EQ(false, true); // Unreached. + else + DCHECK_EQ(true, reached = true); // Reached, passed. + ASSERT_EQ(DCHECK_IS_ON() ? true : false, reached); + + if (false) + DCHECK_EQ(false, true); // Unreached. +} + +TEST_F(LoggingTest, CheckEqStatements) { + bool reached = false; + if (false) + CHECK_EQ(false, true); // Unreached. + else + CHECK_EQ(true, reached = true); // Reached, passed. + ASSERT_TRUE(reached); + + if (false) + CHECK_EQ(false, true); // Unreached. +} + // Test that defining an operator<< for a type in a namespace doesn't prevent // other code in that namespace from calling the operator<<(ostream, wstring) // defined by logging.h. This can fail if operator<<(ostream, wstring) can't be |