Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2545)

Unified Diff: cc/base/math_util_unittest.cc

Issue 1286463003: fixup! cc: Handle overflow/underflow in MathUtil::RoundUp/RoundDown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/math_util_unittest.cc
diff --git a/cc/base/math_util_unittest.cc b/cc/base/math_util_unittest.cc
index e55c721dc883db40dee6e5a7184bbe7d2411995d..ae0cf9860bdb57f8b45b9da16e9e40df3f5c7e37 100644
--- a/cc/base/math_util_unittest.cc
+++ b/cc/base/math_util_unittest.cc
@@ -247,7 +247,7 @@ TEST(MathUtilTest, RoundUp) {
}
}
-TEST(MathUtilTest, RoundUpOverFlow) {
+TEST(MathUtilTest, RoundUpOverflow) {
// Rounding up 123 by 50 is 150, which overflows int8_t, but fits in uint8_t.
EXPECT_FALSE(MathUtil::VerifyRoundup<int8_t>(123, 50));
EXPECT_TRUE(MathUtil::VerifyRoundup<uint8_t>(123, 50));
@@ -279,7 +279,7 @@ TEST(MathUtilTest, RoundDown) {
}
}
-TEST(MathUtilTest, RoundDownUnderFlow) {
+TEST(MathUtilTest, RoundDownUnderflow) {
// Rounding down -123 by 50 is -150, which underflows int8_t, but fits in
// int16_t.
EXPECT_FALSE(MathUtil::VerifyRoundDown<int8_t>(-123, 50));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698