Lines Matching refs:T
420 template <typename T>
421 static void CheckStrToFloat(T fn(const char* s, char** end)) { in CheckStrToFloat()
422 FpUlpEq<0, T> pred; in CheckStrToFloat()
453 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+inf", nullptr)); in CheckStrToFloat()
454 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("inf", nullptr)); in CheckStrToFloat()
455 EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-inf", nullptr)); in CheckStrToFloat()
457 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+infinity", nullptr)); in CheckStrToFloat()
458 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("infinity", nullptr)); in CheckStrToFloat()
459 EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-infinity", nullptr)); in CheckStrToFloat()
461 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+infinitude", &p)); in CheckStrToFloat()
463 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("infinitude", &p)); in CheckStrToFloat()
465 EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-infinitude", &p)); in CheckStrToFloat()
469 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("InFiNiTy", nullptr)); in CheckStrToFloat()
708 template <typename T>
709 static void CheckStrToInt(T fn(const char* s, char** end, int base)) { in CheckStrToInt()
714 ASSERT_EQ(T(0), fn("123", &end_p, -1)); in CheckStrToInt()
719 ASSERT_EQ(T(0), fn("123", &end_p, 1)); in CheckStrToInt()
724 ASSERT_EQ(T(0), fn("123", &end_p, 37)); in CheckStrToInt()
728 ASSERT_EQ(T(0), fn("0xy", &end_p, 16)); in CheckStrToInt()
731 if (std::numeric_limits<T>::is_signed) { in CheckStrToInt()
733 std::string min{std::to_string(std::numeric_limits<T>::min())}; in CheckStrToInt()
736 ASSERT_EQ(std::numeric_limits<T>::min(), fn(min.c_str(), &end_p, 0)); in CheckStrToInt()
743 ASSERT_EQ(std::numeric_limits<T>::min(), fn(min.c_str(), &end_p, 0)); in CheckStrToInt()
749 std::string max{std::to_string(std::numeric_limits<T>::max())}; in CheckStrToInt()
752 ASSERT_EQ(std::numeric_limits<T>::max(), fn(max.c_str(), &end_p, 0)); in CheckStrToInt()
759 ASSERT_EQ(std::numeric_limits<T>::max(), fn(max.c_str(), &end_p, 0)); in CheckStrToInt()
767 ASSERT_EQ(std::numeric_limits<T>::max(), in CheckStrToInt()
771 if (std::numeric_limits<T>::is_signed) { in CheckStrToInt()
774 ASSERT_EQ(std::numeric_limits<T>::min(), in CheckStrToInt()