Lines Matching refs:numeric_limits

62   EXPECT_EQ(std::numeric_limits<int32_t>::max(), maxIntN(32));
63 EXPECT_EQ(std::numeric_limits<int64_t>::max(), maxIntN(64));
70 EXPECT_EQ(std::numeric_limits<int32_t>::min(), minIntN(32));
71 EXPECT_EQ(std::numeric_limits<int64_t>::min(), minIntN(64));
204 EXPECT_EQ(std::numeric_limits<uint32_t>::max(),
205 alignTo(std::numeric_limits<uint32_t>::max(), 2, 1));
212 EXPECT_EQ(0u, alignTo(std::numeric_limits<uint32_t>::max(), 2));
225 EXPECT_EQ(0u, alignToPowerOf2(std::numeric_limits<uint32_t>::max(), 2));
231 EXPECT_EQ(std::numeric_limits<uint32_t>::max() - 1,
232 alignDown(std::numeric_limits<uint32_t>::max(), 2));
236 const T Max = std::numeric_limits<T>::max();
306 const T Max = std::numeric_limits<T>::max();
354 // and A + B == std::numeric_limits<T>::digits.
356 const int Digits = std::numeric_limits<T>::digits;
386 const T Max = std::numeric_limits<T>::max();
484 EXPECT_EQ(divideNearest(std::numeric_limits<uint32_t>::max(), 2),
485 std::numeric_limits<uint32_t>::max() / 2 + 1);
486 EXPECT_EQ(divideNearest(std::numeric_limits<uint64_t>::max(), 2),
487 std::numeric_limits<uint64_t>::max() / 2 + 1);
488 EXPECT_EQ(divideNearest(std::numeric_limits<uint64_t>::max(), 1),
489 std::numeric_limits<uint64_t>::max());
490 EXPECT_EQ(divideNearest(std::numeric_limits<uint64_t>::max() - 1,
491 std::numeric_limits<uint64_t>::max()),
504 EXPECT_EQ(divideCeil(std::numeric_limits<uint32_t>::max(), 2),
505 std::numeric_limits<uint32_t>::max() / 2 + 1);
506 EXPECT_EQ(divideCeil(std::numeric_limits<uint64_t>::max(), 2),
507 std::numeric_limits<uint64_t>::max() / 2 + 1);
508 EXPECT_EQ(divideCeil(std::numeric_limits<uint64_t>::max(), 1),
509 std::numeric_limits<uint64_t>::max());
519 EXPECT_EQ(divideCeilSigned(std::numeric_limits<int32_t>::max(), 2),
520 std::numeric_limits<int32_t>::max() / 2 + 1);
521 EXPECT_EQ(divideCeilSigned(std::numeric_limits<int64_t>::max(), 2),
522 std::numeric_limits<int64_t>::max() / 2 + 1);
523 EXPECT_EQ(divideCeilSigned(std::numeric_limits<int32_t>::max(), -2),
524 std::numeric_limits<int32_t>::min() / 2 + 1);
525 EXPECT_EQ(divideCeilSigned(std::numeric_limits<int64_t>::max(), -2),
526 std::numeric_limits<int64_t>::min() / 2 + 1);
527 EXPECT_EQ(divideCeilSigned(std::numeric_limits<int64_t>::min(), 1),
528 std::numeric_limits<int64_t>::min());
532 divideSignedWouldOverflow(std::numeric_limits<int8_t>::min(), -1));
534 divideSignedWouldOverflow(std::numeric_limits<int64_t>::min(), -1));
546 EXPECT_EQ(divideFloorSigned(std::numeric_limits<int32_t>::max(), 2),
547 std::numeric_limits<int32_t>::max() / 2);
548 EXPECT_EQ(divideFloorSigned(std::numeric_limits<int64_t>::max(), 2),
549 std::numeric_limits<int64_t>::max() / 2);
550 EXPECT_EQ(divideFloorSigned(std::numeric_limits<int32_t>::max(), -2),
551 std::numeric_limits<int32_t>::min() / 2);
552 EXPECT_EQ(divideFloorSigned(std::numeric_limits<int64_t>::max(), -2),
553 std::numeric_limits<int64_t>::min() / 2);
554 EXPECT_EQ(divideFloorSigned(std::numeric_limits<int64_t>::min(), 1),
555 std::numeric_limits<int64_t>::min());
585 auto MaxValue = std::numeric_limits<TypeParam>::max();
592 auto MaxValue = std::numeric_limits<TypeParam>::max();
594 EXPECT_EQ(Result, std::numeric_limits<TypeParam>::min());
599 auto MinValue = std::numeric_limits<TypeParam>::min();
606 auto MinValue = std::numeric_limits<TypeParam>::min();
608 EXPECT_EQ(Result, std::numeric_limits<TypeParam>::max());
619 auto MinValue = std::numeric_limits<TypeParam>::min();
626 auto MinValue = std::numeric_limits<TypeParam>::min();
633 auto MaxValue = std::numeric_limits<TypeParam>::max();
634 auto MinValue = std::numeric_limits<TypeParam>::min();
641 auto MaxValue = std::numeric_limits<TypeParam>::max();
642 auto MinValue = std::numeric_limits<TypeParam>::min();
661 auto MaxValue = std::numeric_limits<TypeParam>::max();
662 auto MinValue = std::numeric_limits<TypeParam>::min();
669 auto MinValue = std::numeric_limits<TypeParam>::min();
676 auto MinValue = std::numeric_limits<TypeParam>::min();
677 auto MaxValue = std::numeric_limits<TypeParam>::max();