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

Side by Side Diff: base/time/time_unittest.cc

Issue 1128203010: base: Remove the remaining usage GG_(U)INTn_C macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 7 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 | « base/time/time_posix.cc ('k') | base/time/time_win.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 (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 "base/time/time.h" 5 #include "base/time/time.h"
6 6
7 #include <stdint.h>
7 #include <time.h> 8 #include <time.h>
8
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/threading/platform_thread.h" 15 #include "base/threading/platform_thread.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 exploded.year = 1970; 825 exploded.year = 1970;
826 exploded.month = 1; 826 exploded.month = 1;
827 exploded.day_of_week = 0; // Should be unusued. 827 exploded.day_of_week = 0; // Should be unusued.
828 exploded.day_of_month = 1; 828 exploded.day_of_month = 1;
829 exploded.hour = 0; 829 exploded.hour = 0;
830 exploded.minute = 0; 830 exploded.minute = 0;
831 exploded.second = 0; 831 exploded.second = 0;
832 exploded.millisecond = 0; 832 exploded.millisecond = 0;
833 Time t = Time::FromUTCExploded(exploded); 833 Time t = Time::FromUTCExploded(exploded);
834 // Unix 1970 epoch. 834 // Unix 1970 epoch.
835 EXPECT_EQ(GG_INT64_C(11644473600000000), t.ToInternalValue()); 835 EXPECT_EQ(INT64_C(11644473600000000), t.ToInternalValue());
836 836
837 // We can't test 1601 epoch, since the system time functions on Linux 837 // We can't test 1601 epoch, since the system time functions on Linux
838 // only compute years starting from 1900. 838 // only compute years starting from 1900.
839 } 839 }
840 840
841 // We could define this separately for Time, TimeTicks and TimeDelta but the 841 // We could define this separately for Time, TimeTicks and TimeDelta but the
842 // definitions would be identical anyway. 842 // definitions would be identical anyway.
843 template <class Any> 843 template <class Any>
844 std::string AnyToString(Any any) { 844 std::string AnyToString(Any any) {
845 std::ostringstream oss; 845 std::ostringstream oss;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1093
1094 TEST(TimeTicksLogging, DoesNotMakeStreamBad) { 1094 TEST(TimeTicksLogging, DoesNotMakeStreamBad) {
1095 std::ostringstream oss; 1095 std::ostringstream oss;
1096 oss << TimeTicks(); 1096 oss << TimeTicks();
1097 EXPECT_TRUE(oss.good()); 1097 EXPECT_TRUE(oss.good());
1098 } 1098 }
1099 1099
1100 } // namespace 1100 } // namespace
1101 1101
1102 } // namespace base 1102 } // namespace base
OLDNEW
« no previous file with comments | « base/time/time_posix.cc ('k') | base/time/time_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698