• Home
  • Raw
  • Download

Lines Matching refs:Time

40     Time::Exploded explode;  in TEST()
82 base::Time result; in TEST()
83 EXPECT_FALSE(base::Time::FromUTCExploded(test.explode, &result)); in TEST()
85 EXPECT_FALSE(base::Time::FromLocalExploded(test.explode, &result)); in TEST()
114 comparison_time_local_ = Time::FromTimeT(converted_time); in SetUp()
117 comparison_time_pdt_ = Time::FromTimeT(1192477500); in SetUp()
120 Time comparison_time_local_;
121 Time comparison_time_pdt_;
129 Time::FromDeltaSinceWindowsEpoch(delta).ToDeltaSinceWindowsEpoch()); in TEST_F()
131 const Time now = Time::Now(); in TEST_F()
132 const Time actual = in TEST_F()
133 Time::FromDeltaSinceWindowsEpoch(now.ToDeltaSinceWindowsEpoch()); in TEST_F()
139 const Time should_be_null = in TEST_F()
140 Time::FromDeltaSinceWindowsEpoch(Time().ToDeltaSinceWindowsEpoch()); in TEST_F()
146 EXPECT_EQ(10, Time().FromTimeT(10).ToTimeT()); in TEST_F()
147 EXPECT_EQ(10.0, Time().FromTimeT(10).ToDoubleT()); in TEST_F()
150 EXPECT_EQ(0, Time().ToTimeT()); in TEST_F()
151 EXPECT_EQ(0, Time::FromTimeT(0).ToInternalValue()); in TEST_F()
166 Time our_time_1 = Time::FromTimeT(now_t_1); in TEST_F()
167 Time::Exploded exploded; in TEST_F()
179 Time our_time_2; in TEST_F()
180 EXPECT_TRUE(Time::FromUTCExploded(exploded, &our_time_2)); in TEST_F()
212 Time our_time_1 = Time::FromTimeT(now_t_1); in TEST_F()
213 Time::Exploded exploded; in TEST_F()
225 Time our_time_2; in TEST_F()
226 EXPECT_TRUE(Time::FromLocalExploded(exploded, &our_time_2)); in TEST_F()
235 Time epoch = Time::FromJsTime(0.0); in TEST_F()
236 EXPECT_EQ(epoch, Time::UnixEpoch()); in TEST_F()
237 Time t = Time::FromJsTime(700000.3); in TEST_F()
239 t = Time::FromDoubleT(800.73); in TEST_F()
245 Time now = Time::Now(); in TEST_F()
246 Time also_now = Time::FromTimeVal(now.ToTimeVal()); in TEST_F()
254 Time now = Time::NowFromSystemTime(); in TEST_F()
255 Time::Exploded exploded1 = {0}; in TEST_F()
258 Time time; in TEST_F()
259 EXPECT_TRUE(Time::FromUTCExploded(exploded1, &time)); in TEST_F()
260 Time::Exploded exploded2 = {0}; in TEST_F()
266 Time zero_time(Time::FromTimeT(0)); in TEST_F()
273 Time a = Time::Now(); in TEST_F()
274 Time::Exploded exploded; in TEST_F()
277 Time b; in TEST_F()
278 EXPECT_TRUE(Time::FromLocalExploded(exploded, &b)); in TEST_F()
287 Time a = Time::Now(); in TEST_F()
288 Time::Exploded exploded; in TEST_F()
291 Time b; in TEST_F()
292 EXPECT_TRUE(Time::FromUTCExploded(exploded, &b)); in TEST_F()
297 Time::Exploded exploded; in TEST_F()
298 Time::Now().LocalMidnight().LocalExplode(&exploded); in TEST_F()
319 Time parsed_time; in TEST_F()
320 EXPECT_TRUE(Time::FromString(time_buf, &parsed_time)); in TEST_F()
325 Time time; in TEST_F()
326 EXPECT_TRUE(Time::FromString("Sun, 06 May 2012 12:00:00 GMT", &time)); in TEST_F()
327 Time::Exploded exploded; in TEST_F()
333 Time time; in TEST_F()
334 EXPECT_TRUE(Time::FromString("Wed, 09 May 2012 12:00:00 GMT", &time)); in TEST_F()
335 Time::Exploded exploded; in TEST_F()
341 Time time; in TEST_F()
342 EXPECT_TRUE(Time::FromString("Sat, 12 May 2012 12:00:00 GMT", &time)); in TEST_F()
343 Time::Exploded exploded; in TEST_F()
349 Time parsed_time; in TEST_F()
350 EXPECT_TRUE(Time::FromString("Mon, 15 Oct 2007 19:45:00 GMT", &parsed_time)); in TEST_F()
355 Time parsed_time; in TEST_F()
356 EXPECT_TRUE(Time::FromString("15 Oct 07 12:45:00", &parsed_time)); in TEST_F()
361 Time parsed_time; in TEST_F()
362 EXPECT_TRUE(Time::FromString("15 Oct 07 19:45 GMT", &parsed_time)); in TEST_F()
367 Time parsed_time; in TEST_F()
368 EXPECT_TRUE(Time::FromString("Mon Oct 15 12:45 PDT 2007", &parsed_time)); in TEST_F()
373 Time parsed_time; in TEST_F()
374 EXPECT_TRUE(Time::FromString("Monday, Oct 15, 2007 12:45 PM", &parsed_time)); in TEST_F()
379 Time parsed_time; in TEST_F()
380 EXPECT_TRUE(Time::FromString("10/15/07 12:45:00 PM", &parsed_time)); in TEST_F()
385 Time parsed_time; in TEST_F()
386 EXPECT_TRUE(Time::FromString("15-OCT-2007 12:45pm", &parsed_time)); in TEST_F()
391 Time parsed_time; in TEST_F()
392 EXPECT_TRUE(Time::FromString("16 Oct 2007 4:45-JST (Tuesday)", &parsed_time)); in TEST_F()
397 Time parsed_time; in TEST_F()
398 EXPECT_TRUE(Time::FromString("15/10/07 12:45", &parsed_time)); in TEST_F()
404 Time parsed_time; in TEST_F()
407 EXPECT_TRUE(Time::FromString("Thu Jan 01 01:00:00 +0100 1970", in TEST_F()
410 EXPECT_TRUE(Time::FromString("Thu Jan 01 00:00:00 GMT 1970", in TEST_F()
416 Time parsed_time; in TEST_F()
419 EXPECT_TRUE(Time::FromString("Thu Jan 01 01:00:01 +0100 1970", in TEST_F()
422 EXPECT_TRUE(Time::FromString("Thu Jan 01 00:00:01 GMT 1970", in TEST_F()
428 Time parsed_time; in TEST_F()
431 EXPECT_TRUE(Time::FromString("Thu Jan 01 01:00:02 +0100 1970", in TEST_F()
434 EXPECT_TRUE(Time::FromString("Thu Jan 01 00:00:02 GMT 1970", in TEST_F()
440 Time parsed_time; in TEST_F()
443 EXPECT_TRUE(Time::FromString("Thu Jan 01 00:59:59 +0100 1970", in TEST_F()
446 EXPECT_TRUE(Time::FromString("Wed Dec 31 23:59:59 GMT 1969", in TEST_F()
455 Time parsed_time; in TEST_F()
457 EXPECT_TRUE(Time::FromString("Wed Dec 31 23:59:59 GMT 2100", in TEST_F()
463 Time parsed_time; in TEST_F()
466 EXPECT_TRUE(Time::FromString("Thu Jan 01 00:59:58 +0100 1970", in TEST_F()
469 EXPECT_TRUE(Time::FromString("Wed Dec 31 23:59:58 GMT 1969", in TEST_F()
475 Time parsed_time; in TEST_F()
478 EXPECT_TRUE(Time::FromString("Wed Jun 29 19:40:01 +0100 1960", in TEST_F()
481 EXPECT_TRUE(Time::FromString("Wed Jun 29 18:40:01 GMT 1960", in TEST_F()
484 EXPECT_TRUE(Time::FromString("Wed Jun 29 17:40:01 GMT 1960", in TEST_F()
490 Time parsed_time; in TEST_F()
491 EXPECT_FALSE(Time::FromString("", &parsed_time)); in TEST_F()
495 Time parsed_time; in TEST_F()
496 EXPECT_FALSE(Time::FromString("Monday morning 2000", &parsed_time)); in TEST_F()
501 Time t; in TEST_F()
502 Time::Exploded exploded; in TEST_F()
504 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1); in TEST_F()
516 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1000); in TEST_F()
528 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1001); in TEST_F()
540 t = Time::UnixEpoch() - TimeDelta::FromMilliseconds(1000); in TEST_F()
552 t = Time::UnixEpoch() - TimeDelta::FromMilliseconds(1001); in TEST_F()
565 t = Time::UnixEpoch(); in TEST_F()
577 t = Time::UnixEpoch() + TimeDelta::FromMicroseconds(1); in TEST_F()
589 t = Time::UnixEpoch() + TimeDelta::FromMicroseconds(1000); in TEST_F()
601 t = Time::UnixEpoch() + TimeDelta::FromMilliseconds(1000); in TEST_F()
613 t = Time::UnixEpoch() + TimeDelta::FromMilliseconds(1001); in TEST_F()
627 Time max = Time::Max(); in TEST_F()
629 EXPECT_EQ(max, Time::Max()); in TEST_F()
630 EXPECT_GT(max, Time::Now()); in TEST_F()
631 EXPECT_GT(max, Time()); in TEST_F()
635 Time t = Time::Max(); in TEST_F()
638 t = Time::FromDoubleT(std::numeric_limits<double>::infinity()); in TEST_F()
642 t = Time::FromJsTime(std::numeric_limits<double>::infinity()); in TEST_F()
646 t = Time::FromTimeT(std::numeric_limits<time_t>::max()); in TEST_F()
653 tval.tv_usec = static_cast<suseconds_t>(Time::kMicrosecondsPerSecond) - 1; in TEST_F()
654 t = Time::FromTimeVal(tval); in TEST_F()
658 EXPECT_EQ(static_cast<suseconds_t>(Time::kMicrosecondsPerSecond) - 1, in TEST_F()
663 t = Time::FromCFAbsoluteTime(std::numeric_limits<CFAbsoluteTime>::infinity()); in TEST_F()
673 t = Time::FromFileTime(ftime); in TEST_F()
683 Time t = Time::FromInternalValue(std::numeric_limits<int64_t>::max() - 1); in TEST_F()
693 Time::Exploded midnight = {2013, // year in TEST_F()
706 Time t; in TEST_F()
707 EXPECT_TRUE(Time::FromLocalExploded(midnight, &t)); in TEST_F()
713 Time::Exploded exploded = {0}; in TEST_F()
717 Time parsed_time; in TEST_F()
719 if (Time::kExplodedMinYear != std::numeric_limits<int>::min()) { in TEST_F()
720 exploded.year = Time::kExplodedMinYear; in TEST_F()
721 EXPECT_TRUE(Time::FromUTCExploded(exploded, &parsed_time)); in TEST_F()
732 EXPECT_FALSE(Time::FromUTCExploded(exploded, &parsed_time)); in TEST_F()
737 if (Time::kExplodedMaxYear != std::numeric_limits<int>::max()) { in TEST_F()
738 exploded.year = Time::kExplodedMaxYear; in TEST_F()
745 EXPECT_TRUE(Time::FromUTCExploded(exploded, &parsed_time)); in TEST_F()
749 EXPECT_FALSE(Time::FromUTCExploded(exploded, &parsed_time)); in TEST_F()
756 static Time Now() { in Now()
761 static Time now_time_;
765 Time TimeOverride::now_time_;
768 TimeOverride::now_time_ = Time::UnixEpoch(); in TEST_F()
771 Time build_time = GetBuildTime(); in TEST_F()
775 EXPECT_LT(build_time, Time::Now()); in TEST_F()
776 EXPECT_GT(Time::Max(), Time::Now()); in TEST_F()
778 EXPECT_GT(Time::Max(), subtle::TimeNowIgnoringOverride()); in TEST_F()
779 EXPECT_LT(build_time, Time::NowFromSystemTime()); in TEST_F()
780 EXPECT_GT(Time::Max(), Time::NowFromSystemTime()); in TEST_F()
782 EXPECT_GT(Time::Max(), subtle::TimeNowFromSystemTimeIgnoringOverride()); in TEST_F()
791 EXPECT_EQ(Time::UnixEpoch() + TimeDelta::FromSeconds(1), Time::Now()); in TEST_F()
792 EXPECT_EQ(Time::UnixEpoch() + TimeDelta::FromSeconds(2), Time::Now()); in TEST_F()
793 EXPECT_EQ(Time::UnixEpoch() + TimeDelta::FromSeconds(3), in TEST_F()
794 Time::NowFromSystemTime()); in TEST_F()
795 EXPECT_EQ(Time::UnixEpoch() + TimeDelta::FromSeconds(4), in TEST_F()
796 Time::NowFromSystemTime()); in TEST_F()
800 EXPECT_GT(Time::Max(), subtle::TimeNowIgnoringOverride()); in TEST_F()
802 EXPECT_GT(Time::Max(), subtle::TimeNowFromSystemTimeIgnoringOverride()); in TEST_F()
805 EXPECT_EQ(Time::UnixEpoch() + TimeDelta::FromSeconds(5), Time::Now()); in TEST_F()
806 EXPECT_EQ(Time::UnixEpoch() + TimeDelta::FromSeconds(6), in TEST_F()
807 Time::NowFromSystemTime()); in TEST_F()
811 EXPECT_LT(build_time, Time::Now()); in TEST_F()
812 EXPECT_GT(Time::Max(), Time::Now()); in TEST_F()
814 EXPECT_GT(Time::Max(), subtle::TimeNowIgnoringOverride()); in TEST_F()
815 EXPECT_LT(build_time, Time::NowFromSystemTime()); in TEST_F()
816 EXPECT_GT(Time::Max(), Time::NowFromSystemTime()); in TEST_F()
818 EXPECT_GT(Time::Max(), subtle::TimeNowFromSystemTimeIgnoringOverride()); in TEST_F()
1186 delta = TimeDelta::FromMicroseconds(Time::kMicrosecondsPerSecond + 1); in TEST()
1198 Time::Exploded exploded; in TEST()
1207 Time t; in TEST()
1208 EXPECT_TRUE(Time::FromUTCExploded(exploded, &t)); in TEST()
1297 TimeDelta::FromSeconds(max_int / Time::kMicrosecondsPerSecond + 1) in TEST()
1302 TimeDelta::FromMilliseconds(max_int / Time::kMillisecondsPerSecond + 1) in TEST()
1309 TimeDelta::FromSeconds(min_int / Time::kMicrosecondsPerSecond - 1) in TEST()
1314 TimeDelta::FromMilliseconds(min_int / Time::kMillisecondsPerSecond - 1) in TEST()
1334 TimeDelta::FromSecondsD(max_d / Time::kMicrosecondsPerSecond + 1) in TEST()
1344 TimeDelta::FromMillisecondsD(max_d / Time::kMillisecondsPerSecond * 2) in TEST()
1349 TimeDelta::FromSecondsD(min_d / Time::kMicrosecondsPerSecond - 1) in TEST()
1354 TimeDelta::FromMillisecondsD(min_d / Time::kMillisecondsPerSecond * 2) in TEST()
1522 EXPECT_TRUE((large_delta + Time::Now()).is_max()); in TEST()
1524 EXPECT_TRUE((Time::Now() + large_delta).is_max()); in TEST()
1527 Time time_now = Time::Now(); in TEST()
1569 DCHECK_EQ(Time(), Time()); in TEST()
1573 Time birthdate; in TEST()
1574 ASSERT_TRUE(Time::FromString("Tue, 02 Sep 2008 09:42:18 GMT", &birthdate)); in TEST()
1581 oss << Time(); in TEST()
1587 oss << Time(); in TEST()