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

Side by Side Diff: base/numerics/safe_numerics_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « base/nix/xdg_util_unittest.cc ('k') | base/observer_list_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #if defined(COMPILER_MSVC) && defined(ARCH_CPU_32_BITS) 5 #if defined(COMPILER_MSVC) && defined(ARCH_CPU_32_BITS)
6 #include <mmintrin.h> 6 #include <mmintrin.h>
7 #endif 7 #endif
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/numerics/safe_conversions.h" 13 #include "base/numerics/safe_conversions.h"
14 #include "base/numerics/safe_math.h" 14 #include "base/numerics/safe_math.h"
15 #include "base/template_util.h" 15 #include "base/template_util.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/googletest/include/gtest/gtest.h"
17 17
18 using std::numeric_limits; 18 using std::numeric_limits;
19 using base::CheckedNumeric; 19 using base::CheckedNumeric;
20 using base::checked_cast; 20 using base::checked_cast;
21 using base::IsValueInRangeForNumericType; 21 using base::IsValueInRangeForNumericType;
22 using base::IsValueNegative; 22 using base::IsValueNegative;
23 using base::SizeT; 23 using base::SizeT;
24 using base::StrictNumeric; 24 using base::StrictNumeric;
25 using base::saturated_cast; 25 using base::saturated_cast;
26 using base::strict_cast; 26 using base::strict_cast;
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 757
758 CheckedNumeric<int> too_large = std::numeric_limits<int>::max(); 758 CheckedNumeric<int> too_large = std::numeric_limits<int>::max();
759 EXPECT_TRUE(too_large.IsValid()); 759 EXPECT_TRUE(too_large.IsValid());
760 too_large += d; 760 too_large += d;
761 EXPECT_FALSE(too_large.IsValid()); 761 EXPECT_FALSE(too_large.IsValid());
762 too_large -= d; 762 too_large -= d;
763 EXPECT_FALSE(too_large.IsValid()); 763 EXPECT_FALSE(too_large.IsValid());
764 too_large /= d; 764 too_large /= d;
765 EXPECT_FALSE(too_large.IsValid()); 765 EXPECT_FALSE(too_large.IsValid());
766 } 766 }
OLDNEW
« no previous file with comments | « base/nix/xdg_util_unittest.cc ('k') | base/observer_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698