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

Side by Side Diff: cc/base/math_util_unittest.cc

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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 unified diff | Download patch
« no previous file with comments | « cc/base/list_container_unittest.cc ('k') | cc/base/random_access_list_container.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/base/math_util.h" 5 #include "cc/base/math_util.h"
6 6
7 #include <stdint.h>
8
7 #include <cmath> 9 #include <cmath>
8 10
9 #include "cc/test/geometry_test_utils.h" 11 #include "cc/test/geometry_test_utils.h"
10 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/rect_f.h" 15 #include "ui/gfx/geometry/rect_f.h"
14 #include "ui/gfx/transform.h" 16 #include "ui/gfx/transform.h"
15 17
16 namespace cc { 18 namespace cc {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 381
380 TEST(MathUtilTest, RoundDownUnderflow) { 382 TEST(MathUtilTest, RoundDownUnderflow) {
381 // Rounding down -123 by 50 is -150, which underflows int8_t, but fits in 383 // Rounding down -123 by 50 is -150, which underflows int8_t, but fits in
382 // int16_t. 384 // int16_t.
383 EXPECT_FALSE(MathUtil::VerifyRoundDown<int8_t>(-123, 50)); 385 EXPECT_FALSE(MathUtil::VerifyRoundDown<int8_t>(-123, 50));
384 EXPECT_TRUE(MathUtil::VerifyRoundDown<int16_t>(-123, 50)); 386 EXPECT_TRUE(MathUtil::VerifyRoundDown<int16_t>(-123, 50));
385 } 387 }
386 388
387 } // namespace 389 } // namespace
388 } // namespace cc 390 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/list_container_unittest.cc ('k') | cc/base/random_access_list_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698