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

Side by Side Diff: ui/gfx/geometry/vector3d_unittest.cc

Issue 1543183002: Switch to standard integer types in ui/gfx/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/geometry/vector2d_unittest.cc ('k') | ui/gfx/gpu_memory_buffer.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <stddef.h>
6
5 #include <cmath> 7 #include <cmath>
6 #include <limits> 8 #include <limits>
7 9
8 #include "base/basictypes.h" 10 #include "base/macros.h"
9 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/gfx/geometry/vector3d_f.h" 12 #include "ui/gfx/geometry/vector3d_f.h"
11 13
12 namespace gfx { 14 namespace gfx {
13 15
14 TEST(Vector3dTest, IsZero) { 16 TEST(Vector3dTest, IsZero) {
15 gfx::Vector3dF float_zero(0, 0, 0); 17 gfx::Vector3dF float_zero(0, 0, 0);
16 gfx::Vector3dF float_nonzero(0.1f, -0.1f, 0.1f); 18 gfx::Vector3dF float_nonzero(0.1f, -0.1f, 0.1f);
17 19
18 EXPECT_TRUE(float_zero.IsZero()); 20 EXPECT_TRUE(float_zero.IsZero());
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 EXPECT_FLOAT_EQ(tests[i].expected, actual); 310 EXPECT_FLOAT_EQ(tests[i].expected, actual);
309 actual = -gfx::ClockwiseAngleBetweenVectorsInDegrees( 311 actual = -gfx::ClockwiseAngleBetweenVectorsInDegrees(
310 tests[i].input2, tests[i].input1, normal_vector); 312 tests[i].input2, tests[i].input1, normal_vector);
311 if (actual < 0.0f) 313 if (actual < 0.0f)
312 actual += 360.0f; 314 actual += 360.0f;
313 EXPECT_FLOAT_EQ(tests[i].expected, actual); 315 EXPECT_FLOAT_EQ(tests[i].expected, actual);
314 } 316 }
315 } 317 }
316 318
317 } // namespace gfx 319 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/geometry/vector2d_unittest.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698