• Home
  • Raw
  • Download

Lines Matching refs:Seconds

66   constexpr absl::Duration d1 = absl::Seconds(1);  in TEST()
67 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
89 constexpr absl::Duration sec = absl::Seconds(1); in TEST()
94 EXPECT_EQ(zero, absl::Seconds(0)); in TEST()
99 EXPECT_EQ(min, absl::Seconds(60)); in TEST()
105 EXPECT_GT(inf, absl::Seconds(kint64max)); in TEST()
106 EXPECT_LT(-inf, absl::Seconds(kint64min)); in TEST()
107 EXPECT_LT(-inf, absl::Seconds(-kint64max)); in TEST()
146 TEST_DURATION_CONVERSION(Seconds); in TEST()
176 const absl::Duration sec = absl::Seconds(N); in TestToConversion()
219 static_assert(absl::Seconds(N) == absl::FromChrono(seconds(N)), ""); in TestFromChronoBasicEquality()
284 EXPECT_EQ(seconds(N), absl::ToChronoSeconds(absl::Seconds(N))); in TestToChrono()
370 TEST_FACTORY_OVERLOADS(absl::Seconds); in TEST()
376 EXPECT_EQ(absl::Milliseconds(1500), absl::Seconds(1.5)); in TEST()
384 EXPECT_EQ(absl::InfiniteDuration(), absl::Seconds(dbl_inf)); in TEST()
390 EXPECT_EQ(-absl::InfiniteDuration(), absl::Seconds(-dbl_inf)); in TEST()
400 constexpr absl::Duration d = absl::Seconds(1); // Any finite duration in TEST()
417 const absl::Duration any_dur = absl::Seconds(1); in TEST()
434 const absl::Duration sec_max = absl::Seconds(kint64max); in TEST()
435 const absl::Duration sec_min = absl::Seconds(kint64min); in TEST()
436 const absl::Duration any_dur = absl::Seconds(1); in TEST()
457 EXPECT_EQ(inf, sec_max + absl::Seconds(1)); in TEST()
459 EXPECT_EQ(-inf, sec_min + -absl::Seconds(1)); in TEST()
471 const absl::Duration sec_max = absl::Seconds(kint64max); in TEST()
472 const absl::Duration sec_min = absl::Seconds(kint64min); in TEST()
473 const absl::Duration any_dur = absl::Seconds(1); in TEST()
488 EXPECT_EQ(inf, sec_max - -absl::Seconds(1)); in TEST()
490 EXPECT_EQ(-inf, sec_min - absl::Seconds(1)); in TEST()
508 const absl::Duration sec_max = absl::Seconds(kint64max); in TEST()
509 const absl::Duration sec_min = absl::Seconds(kint64min); in TEST()
537 const absl::Duration any_dur = absl::Seconds(1); in TEST()
545 EXPECT_NE(absl::InfiniteDuration(), absl::Seconds(1) * kint64max); in TEST()
546 EXPECT_EQ(inf, absl::Seconds(1) * static_cast<double>(kint64max)); in TEST()
547 EXPECT_NE(-absl::InfiniteDuration(), absl::Seconds(1) * kint64min); in TEST()
548 EXPECT_EQ(-inf, absl::Seconds(1) * static_cast<double>(kint64min)); in TEST()
560 const absl::Duration sec_max = absl::Seconds(kint64max); in TEST()
561 const absl::Duration sec_min = absl::Seconds(kint64min); in TEST()
579 EXPECT_EQ(inf, ((sec_max / 0.5) + absl::Seconds(1)) / 0.5); in TEST()
582 EXPECT_EQ(-inf, ((sec_min / 0.5) - absl::Seconds(1)) / 0.5); in TEST()
590 const absl::Duration any_dur = absl::Seconds(1); in TEST()
598 const absl::Duration sec_max = absl::Seconds(kint64max); in TEST()
599 const absl::Duration any_dur = absl::Seconds(1); in TEST()
618 EXPECT_EQ(absl::ZeroDuration(), sec_max % absl::Seconds(1)); in TEST()
626 const absl::Duration sec_max = absl::Seconds(kint64max); in TEST()
627 const absl::Duration any_dur = absl::Seconds(1); in TEST()
739 const absl::Duration any_dur = absl::Seconds(1); in TEST()
761 const absl::Duration any_dur = absl::Seconds(1); in TEST()
825 TEST_NAN_HANDLING(absl::Seconds, nan); in TEST()
832 TEST_NAN_HANDLING(absl::Seconds, -nan); in TEST()
873 TEST_REL_OPS(absl::Seconds); in TEST()
899 TEST_ADD_OPS(absl::Seconds); in TEST()
905 EXPECT_EQ(absl::Seconds(2), absl::Seconds(3) - 2 * absl::Milliseconds(500)); in TEST()
906 EXPECT_EQ(absl::Seconds(2) + absl::Milliseconds(500), in TEST()
907 absl::Seconds(3) - absl::Milliseconds(500)); in TEST()
909 EXPECT_EQ(absl::Seconds(1) + absl::Milliseconds(998), in TEST()
923 absl::Duration d_7_5 = absl::Seconds(7) + absl::Milliseconds(500); in TEST()
924 absl::Duration d_3_7 = absl::Seconds(3) + absl::Milliseconds(700); in TEST()
925 absl::Duration ans_3_8 = absl::Seconds(3) + absl::Milliseconds(800); in TEST()
929 absl::Duration min_dur = absl::Seconds(kint64min); in TEST()
930 EXPECT_EQ(absl::Seconds(0), min_dur - min_dur); in TEST()
931 EXPECT_EQ(absl::Seconds(kint64max), absl::Seconds(-1) - min_dur); in TEST()
975 EXPECT_EQ(absl::Seconds(1), AbsDuration(absl::Seconds(1))); in TEST()
976 EXPECT_EQ(absl::Seconds(1), AbsDuration(absl::Seconds(-1))); in TEST()
982 absl::Seconds(kint64max) + (absl::Seconds(1) - absl::Nanoseconds(1) / 4); in TEST()
985 absl::Duration min_dur = absl::Seconds(kint64min); in TEST()
1026 TEST_MUL_OPS(absl::Seconds); in TEST()
1035 absl::Seconds(kint64max) + (absl::Seconds(1) - absl::Nanoseconds(1) / 4); in TEST()
1036 absl::Duration min_dur = absl::Seconds(kint64min); in TEST()
1044 absl::Duration sigfigs = absl::Seconds(2000000000) + absl::Nanoseconds(3); in TEST()
1045 EXPECT_EQ(absl::Seconds(666666666) + absl::Nanoseconds(666666667) + in TEST()
1048 sigfigs = absl::Seconds(int64_t{7000000000}); in TEST()
1049 EXPECT_EQ(absl::Seconds(2333333333) + absl::Nanoseconds(333333333) + in TEST()
1053 EXPECT_EQ(absl::Seconds(7) + absl::Milliseconds(500), absl::Seconds(3) * 2.5); in TEST()
1054 EXPECT_EQ(absl::Seconds(8) * -1 + absl::Milliseconds(300), in TEST()
1055 (absl::Seconds(2) + absl::Milliseconds(200)) * -3.5); in TEST()
1056 EXPECT_EQ(-absl::Seconds(8) + absl::Milliseconds(300), in TEST()
1057 (absl::Seconds(2) + absl::Milliseconds(200)) * -3.5); in TEST()
1058 EXPECT_EQ(absl::Seconds(1) + absl::Milliseconds(875), in TEST()
1059 (absl::Seconds(7) + absl::Milliseconds(500)) / 4); in TEST()
1060 EXPECT_EQ(absl::Seconds(30), in TEST()
1061 (absl::Seconds(7) + absl::Milliseconds(500)) / 0.25); in TEST()
1062 EXPECT_EQ(absl::Seconds(3), in TEST()
1063 (absl::Seconds(7) + absl::Milliseconds(500)) / 2.5); in TEST()
1080 absl::Seconds(1) % absl::Milliseconds(300)); in TEST()
1083 (absl::Seconds(3) + absl::Milliseconds(800)) % absl::Milliseconds(500)); in TEST()
1085 EXPECT_EQ(absl::Nanoseconds(1), absl::Nanoseconds(1) % absl::Seconds(1)); in TEST()
1086 EXPECT_EQ(absl::Nanoseconds(-1), absl::Nanoseconds(-1) % absl::Seconds(1)); in TEST()
1087 EXPECT_EQ(0, absl::Nanoseconds(-1) / absl::Seconds(1)); // Actual -1e-9 in TEST()
1093 TEST_MOD_IDENTITY(absl::Seconds(0), absl::Seconds(2)); in TEST()
1094 TEST_MOD_IDENTITY(absl::Seconds(1), absl::Seconds(1)); in TEST()
1095 TEST_MOD_IDENTITY(absl::Seconds(1), absl::Seconds(2)); in TEST()
1096 TEST_MOD_IDENTITY(absl::Seconds(2), absl::Seconds(1)); in TEST()
1098 TEST_MOD_IDENTITY(absl::Seconds(-2), absl::Seconds(1)); in TEST()
1099 TEST_MOD_IDENTITY(absl::Seconds(2), absl::Seconds(-1)); in TEST()
1100 TEST_MOD_IDENTITY(absl::Seconds(-2), absl::Seconds(-1)); in TEST()
1112 absl::Duration mixed_a = absl::Seconds(1) + absl::Nanoseconds(2); in TEST()
1113 absl::Duration mixed_b = absl::Seconds(1) + absl::Nanoseconds(3); in TEST()
1115 TEST_MOD_IDENTITY(absl::Seconds(0), mixed_a); in TEST()
1137 EXPECT_EQ(absl::Seconds(1), Trunc(d, unit_sign * absl::Seconds(1))); in TEST()
1138 EXPECT_EQ(inf, Trunc(inf, unit_sign * absl::Seconds(1))); in TEST()
1146 EXPECT_EQ(absl::Seconds(-1), Trunc(-d, unit_sign * absl::Seconds(1))); in TEST()
1147 EXPECT_EQ(-inf, Trunc(-inf, unit_sign * absl::Seconds(1))); in TEST()
1161 EXPECT_EQ(absl::Seconds(1), absl::Floor(d, unit_sign * absl::Seconds(1))); in TEST()
1162 EXPECT_EQ(inf, absl::Floor(inf, unit_sign * absl::Seconds(1))); in TEST()
1170 EXPECT_EQ(absl::Seconds(-2), absl::Floor(-d, unit_sign * absl::Seconds(1))); in TEST()
1171 EXPECT_EQ(-inf, absl::Floor(-inf, unit_sign * absl::Seconds(1))); in TEST()
1185 EXPECT_EQ(absl::Seconds(2), absl::Ceil(d, unit_sign * absl::Seconds(1))); in TEST()
1186 EXPECT_EQ(inf, absl::Ceil(inf, unit_sign * absl::Seconds(1))); in TEST()
1194 EXPECT_EQ(absl::Seconds(-1), absl::Ceil(-d, unit_sign * absl::Seconds(1))); in TEST()
1195 EXPECT_EQ(-inf, absl::Ceil(-inf, unit_sign * absl::Seconds(1))); in TEST()
1227 ROUND_TRIP_UNIT(Seconds, kint64min, kint64min + kRange); in TEST()
1228 ROUND_TRIP_UNIT(Seconds, -kRange, kRange); in TEST()
1229 ROUND_TRIP_UNIT(Seconds, kint64max - kRange, kint64max); in TEST()
1248 {absl::Seconds(1) + absl::Nanoseconds(1), {1, 1}}, in TEST()
1249 {absl::Seconds(1) + absl::Nanoseconds(1) / 2, {1, 0}}, in TEST()
1250 {absl::Seconds(1) + absl::Nanoseconds(0), {1, 0}}, in TEST()
1251 {absl::Seconds(0) + absl::Nanoseconds(0), {0, 0}}, in TEST()
1252 {absl::Seconds(0) - absl::Nanoseconds(1) / 2, {0, 0}}, in TEST()
1253 {absl::Seconds(0) - absl::Nanoseconds(1), {-1, 999999999}}, in TEST()
1254 {absl::Seconds(-1) + absl::Nanoseconds(1), {-1, 1}}, in TEST()
1255 {absl::Seconds(-1) + absl::Nanoseconds(1) / 2, {-1, 1}}, in TEST()
1256 {absl::Seconds(-1) + absl::Nanoseconds(0), {-1, 0}}, in TEST()
1257 {absl::Seconds(-1) - absl::Nanoseconds(1) / 2, {-1, 0}}, in TEST()
1266 {{1, 1}, absl::Seconds(1) + absl::Nanoseconds(1)}, in TEST()
1267 {{1, 0}, absl::Seconds(1) + absl::Nanoseconds(0)}, in TEST()
1268 {{0, 0}, absl::Seconds(0) + absl::Nanoseconds(0)}, in TEST()
1269 {{0, -1}, absl::Seconds(0) - absl::Nanoseconds(1)}, in TEST()
1270 {{-1, 999999999}, absl::Seconds(0) - absl::Nanoseconds(1)}, in TEST()
1271 {{-1, 1}, absl::Seconds(-1) + absl::Nanoseconds(1)}, in TEST()
1272 {{-1, 0}, absl::Seconds(-1) + absl::Nanoseconds(0)}, in TEST()
1273 {{-1, -1}, absl::Seconds(-1) - absl::Nanoseconds(1)}, in TEST()
1274 {{-2, 999999999}, absl::Seconds(-1) - absl::Nanoseconds(1)}, in TEST()
1285 {absl::Seconds(1) + absl::Microseconds(1), {1, 1}}, in TEST()
1286 {absl::Seconds(1) + absl::Microseconds(1) / 2, {1, 0}}, in TEST()
1287 {absl::Seconds(1) + absl::Microseconds(0), {1, 0}}, in TEST()
1288 {absl::Seconds(0) + absl::Microseconds(0), {0, 0}}, in TEST()
1289 {absl::Seconds(0) - absl::Microseconds(1) / 2, {0, 0}}, in TEST()
1290 {absl::Seconds(0) - absl::Microseconds(1), {-1, 999999}}, in TEST()
1291 {absl::Seconds(-1) + absl::Microseconds(1), {-1, 1}}, in TEST()
1292 {absl::Seconds(-1) + absl::Microseconds(1) / 2, {-1, 1}}, in TEST()
1293 {absl::Seconds(-1) + absl::Microseconds(0), {-1, 0}}, in TEST()
1294 {absl::Seconds(-1) - absl::Microseconds(1) / 2, {-1, 0}}, in TEST()
1303 {{1, 1}, absl::Seconds(1) + absl::Microseconds(1)}, in TEST()
1304 {{1, 0}, absl::Seconds(1) + absl::Microseconds(0)}, in TEST()
1305 {{0, 0}, absl::Seconds(0) + absl::Microseconds(0)}, in TEST()
1306 {{0, -1}, absl::Seconds(0) - absl::Microseconds(1)}, in TEST()
1307 {{-1, 999999}, absl::Seconds(0) - absl::Microseconds(1)}, in TEST()
1308 {{-1, 1}, absl::Seconds(-1) + absl::Microseconds(1)}, in TEST()
1309 {{-1, 0}, absl::Seconds(-1) + absl::Microseconds(0)}, in TEST()
1310 {{-1, -1}, absl::Seconds(-1) - absl::Microseconds(1)}, in TEST()
1311 {{-2, 999999}, absl::Seconds(-1) - absl::Microseconds(1)}, in TEST()
1321 EXPECT_EQ(absl::ZeroDuration(), absl::Seconds(0)); in TEST()
1323 EXPECT_EQ(absl::ZeroDuration(), absl::Seconds(0.124999999e-9)); in TEST()
1324 EXPECT_EQ(absl::Nanoseconds(1) / 4, absl::Seconds(0.125e-9)); in TEST()
1325 EXPECT_EQ(absl::Nanoseconds(1) / 4, absl::Seconds(0.250e-9)); in TEST()
1326 EXPECT_EQ(absl::Nanoseconds(1) / 2, absl::Seconds(0.375e-9)); in TEST()
1327 EXPECT_EQ(absl::Nanoseconds(1) / 2, absl::Seconds(0.500e-9)); in TEST()
1328 EXPECT_EQ(absl::Nanoseconds(3) / 4, absl::Seconds(0.625e-9)); in TEST()
1329 EXPECT_EQ(absl::Nanoseconds(3) / 4, absl::Seconds(0.750e-9)); in TEST()
1330 EXPECT_EQ(absl::Nanoseconds(1), absl::Seconds(0.875e-9)); in TEST()
1331 EXPECT_EQ(absl::Nanoseconds(1), absl::Seconds(1.000e-9)); in TEST()
1333 EXPECT_EQ(absl::ZeroDuration(), absl::Seconds(-0.124999999e-9)); in TEST()
1334 EXPECT_EQ(-absl::Nanoseconds(1) / 4, absl::Seconds(-0.125e-9)); in TEST()
1335 EXPECT_EQ(-absl::Nanoseconds(1) / 4, absl::Seconds(-0.250e-9)); in TEST()
1336 EXPECT_EQ(-absl::Nanoseconds(1) / 2, absl::Seconds(-0.375e-9)); in TEST()
1337 EXPECT_EQ(-absl::Nanoseconds(1) / 2, absl::Seconds(-0.500e-9)); in TEST()
1338 EXPECT_EQ(-absl::Nanoseconds(3) / 4, absl::Seconds(-0.625e-9)); in TEST()
1339 EXPECT_EQ(-absl::Nanoseconds(3) / 4, absl::Seconds(-0.750e-9)); in TEST()
1340 EXPECT_EQ(-absl::Nanoseconds(1), absl::Seconds(-0.875e-9)); in TEST()
1341 EXPECT_EQ(-absl::Nanoseconds(1), absl::Seconds(-1.000e-9)); in TEST()
1373 auto direct_seconds = absl::Seconds(time_as_seconds); in VerifySameAsMul()
1374 auto mul_by_one_second = time_as_seconds * absl::Seconds(1); in VerifySameAsMul()
1401 absl::Duration s_plus_t = absl::Seconds(seconds) + ticks * duration_tick; in TEST()
1408 EXPECT_EQ(d, absl::Seconds(low_edge)); in TEST()
1411 EXPECT_EQ(after_d, absl::Seconds(high_edge)); in TEST()
1416 absl::Duration mid_duration = absl::Seconds(midpoint); in TEST()
1534 absl::Seconds(10))); in TEST()
1537 EXPECT_EQ("0", absl::FormatDuration(absl::Seconds(0))); in TEST()
1543 EXPECT_EQ("1s", absl::FormatDuration(absl::Seconds(1))); in TEST()
1548 EXPECT_EQ("1h1s", absl::FormatDuration(absl::Hours(1) + absl::Seconds(1))); in TEST()
1549 EXPECT_EQ("1m1s", absl::FormatDuration(absl::Minutes(1) + absl::Seconds(1))); in TEST()
1585 EXPECT_EQ("-1s", absl::FormatDuration(absl::Seconds(-1))); in TEST()
1592 absl::FormatDuration(-(absl::Hours(1) + absl::Seconds(1)))); in TEST()
1594 absl::FormatDuration(-(absl::Minutes(1) + absl::Seconds(1)))); in TEST()
1614 absl::Seconds(kint64max) + (absl::Seconds(1) - qns); in TEST()
1615 const absl::Duration min_dur = absl::Seconds(kint64min); in TEST()
1624 EXPECT_EQ("55.00000000025s", absl::FormatDuration(absl::Seconds(55) + qns)); in TEST()
1641 (absl::Seconds(1) - absl::Nanoseconds(1)))); in TEST()
1644 huge_range + (absl::Seconds(1) - absl::Nanoseconds(1) / 2))); in TEST()
1647 huge_range + (absl::Seconds(1) - absl::Nanoseconds(1) / 4))); in TEST()
1651 (absl::Seconds(1) - absl::Nanoseconds(1)))); in TEST()
1654 -huge_range - (absl::Seconds(1) - absl::Nanoseconds(1) / 2))); in TEST()
1657 -huge_range - (absl::Seconds(1) - absl::Nanoseconds(1) / 4))); in TEST()
1706 EXPECT_EQ(absl::Seconds(1), d); in TEST()
1720 EXPECT_EQ(absl::Hours(2) + absl::Minutes(3) + absl::Seconds(4), d); in TEST()
1722 EXPECT_EQ(absl::Minutes(3) + absl::Seconds(4) + absl::Microseconds(5), d); in TEST()
1724 EXPECT_EQ(absl::Hours(2) + absl::Minutes(3) + absl::Seconds(4) + in TEST()
1731 EXPECT_EQ(absl::Hours(5) + absl::Minutes(3) + absl::Seconds(4) + in TEST()
1743 EXPECT_EQ(1.5 * absl::Seconds(1), d); in TEST()
1757 EXPECT_EQ(absl::Seconds(-1), d); in TEST()
1764 EXPECT_EQ(-(absl::Hours(1) + absl::Seconds(2)), d); in TEST()
1782 TEST_PARSE_ROUNDTRIP(absl::Seconds(1)); in TEST()
1790 TEST_PARSE_ROUNDTRIP(absl::Seconds(-1)); in TEST()
1803 TEST_PARSE_ROUNDTRIP(huge_range + (absl::Seconds(1) - absl::Nanoseconds(1))); in TEST()