summaryrefslogtreecommitdiffstats
path: root/base/numerics
diff options
context:
space:
mode:
authorncbray@chromium.org <ncbray@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-09 05:24:02 +0000
committerncbray@chromium.org <ncbray@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-09 05:25:16 +0000
commitb6bf5c32ed8ee629c82110241608e9e60c35752d (patch)
treef39fa0d9422300f07b56b8f65af3f0f7ea351c7e /base/numerics
parent97af9a268ab2a10eaa9199d52cae828f8206fc5f (diff)
downloadchromium_src-b6bf5c32ed8ee629c82110241608e9e60c35752d.zip
chromium_src-b6bf5c32ed8ee629c82110241608e9e60c35752d.tar.gz
chromium_src-b6bf5c32ed8ee629c82110241608e9e60c35752d.tar.bz2
Roll gtest and gmock DEPS.
These DEPS have not been updated for ~2 years, so there is a good chance something will blow up. Due to interdependancy between the repos, rolling gtest required gmock also be rolled. This CL was originally landed as 288164 and reverted as 288239 because it allows more aggressive LTO in MSVS. This resulted in the compiler noticing an intentional arithmetic overflow and warning about it. BUG=401761 Review URL: https://codereview.chromium.org/425333002 Cr-Commit-Position: refs/heads/master@{#288505} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/numerics')
-rw-r--r--base/numerics/safe_numerics_unittest.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/numerics/safe_numerics_unittest.cc b/base/numerics/safe_numerics_unittest.cc
index 09ad130..23c2c78 100644
--- a/base/numerics/safe_numerics_unittest.cc
+++ b/base/numerics/safe_numerics_unittest.cc
@@ -34,6 +34,13 @@ inline void ResetFloatingPointUnit() {
#endif
}
+// These tests deliberately cause arithmetic overflows. If the compiler is
+// aggressive enough, it can const fold these overflows. Disable warnings about
+// overflows for const expressions.
+#if defined(OS_WIN)
+#pragma warning(disable:4756)
+#endif
+
// Helper macros to wrap displaying the conversion types and line numbers.
#define TEST_EXPECTED_VALIDITY(expected, actual) \
EXPECT_EQ(expected, CheckedNumeric<Dst>(actual).validity()) \