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

Unified Diff: base/time_unittest.cc

Issue 10883061: Add 'base::Time::Max()' to explicitly refer to the end of time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « base/time.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time_unittest.cc
diff --git a/base/time_unittest.cc b/base/time_unittest.cc
index 43be492144439c5a5e938f0cc69329081af2fead..5421ed1ea5d0011fc397153eb01ca33a167f6446 100644
--- a/base/time_unittest.cc
+++ b/base/time_unittest.cc
@@ -479,6 +479,12 @@ TEST_F(TimeTest, ExplodeBeforeUnixEpoch) {
EXPECT_EQ(1, exploded.millisecond);
}
+TEST_F(TimeTest, Max) {
+ EXPECT_EQ(base::Time::Max(), base::Time::Max());
+ EXPECT_GT(base::Time::Max(), base::Time::Now());
+ EXPECT_GT(base::Time::Max(), base::Time());
+}
+
TEST(TimeTicks, Deltas) {
for (int index = 0; index < 50; index++) {
TimeTicks ticks_start = TimeTicks::Now();
« no previous file with comments | « base/time.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698