Lines Matching refs:fn
497 static void CheckStrToFloat(T fn(const char* s, char** end)) { in CheckStrToFloat()
500 EXPECT_PRED_FORMAT2(pred, 9.0, fn("9.0", nullptr)); in CheckStrToFloat()
501 EXPECT_PRED_FORMAT2(pred, 9.0, fn("0.9e1", nullptr)); in CheckStrToFloat()
502 EXPECT_PRED_FORMAT2(pred, 9.0, fn("0x1.2p3", nullptr)); in CheckStrToFloat()
506 EXPECT_PRED_FORMAT2(pred, 9.0, fn(s, &p)); in CheckStrToFloat()
509 EXPECT_TRUE(isnan(fn("+nan", nullptr))); in CheckStrToFloat()
510 EXPECT_TRUE(isnan(fn("nan", nullptr))); in CheckStrToFloat()
511 EXPECT_TRUE(isnan(fn("-nan", nullptr))); in CheckStrToFloat()
513 EXPECT_TRUE(isnan(fn("+nan(0xff)", nullptr))); in CheckStrToFloat()
514 EXPECT_TRUE(isnan(fn("nan(0xff)", nullptr))); in CheckStrToFloat()
515 EXPECT_TRUE(isnan(fn("-nan(0xff)", nullptr))); in CheckStrToFloat()
517 EXPECT_TRUE(isnan(fn("+nanny", &p))); in CheckStrToFloat()
519 EXPECT_TRUE(isnan(fn("nanny", &p))); in CheckStrToFloat()
521 EXPECT_TRUE(isnan(fn("-nanny", &p))); in CheckStrToFloat()
524 EXPECT_EQ(0, fn("muppet", &p)); in CheckStrToFloat()
526 EXPECT_EQ(0, fn(" muppet", &p)); in CheckStrToFloat()
529 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+inf", nullptr)); in CheckStrToFloat()
530 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("inf", nullptr)); in CheckStrToFloat()
531 EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-inf", nullptr)); in CheckStrToFloat()
533 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+infinity", nullptr)); in CheckStrToFloat()
534 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("infinity", nullptr)); in CheckStrToFloat()
535 EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-infinity", nullptr)); in CheckStrToFloat()
537 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+infinitude", &p)); in CheckStrToFloat()
539 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("infinitude", &p)); in CheckStrToFloat()
541 EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-infinitude", &p)); in CheckStrToFloat()
545 EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("InFiNiTy", nullptr)); in CheckStrToFloat()
546 EXPECT_TRUE(isnan(fn("NaN", nullptr))); in CheckStrToFloat()
785 static void CheckStrToInt(T fn(const char* s, char** end, int base)) { in CheckStrToInt()
790 ASSERT_EQ(T(0), fn("123", &end_p, -1)); in CheckStrToInt()
795 ASSERT_EQ(T(0), fn("123", &end_p, 1)); in CheckStrToInt()
800 ASSERT_EQ(T(0), fn("123", &end_p, 37)); in CheckStrToInt()
804 ASSERT_EQ(T(0), fn("0xy", &end_p, 16)); in CheckStrToInt()
812 ASSERT_EQ(std::numeric_limits<T>::min(), fn(min.c_str(), &end_p, 0)); in CheckStrToInt()
819 ASSERT_EQ(std::numeric_limits<T>::min(), fn(min.c_str(), &end_p, 0)); in CheckStrToInt()
828 ASSERT_EQ(std::numeric_limits<T>::max(), fn(max.c_str(), &end_p, 0)); in CheckStrToInt()
835 ASSERT_EQ(std::numeric_limits<T>::max(), fn(max.c_str(), &end_p, 0)); in CheckStrToInt()
844 fn("99999999999999999999999999999999999999999999999999999abc", &end_p, 0)); in CheckStrToInt()
851 fn("-99999999999999999999999999999999999999999999999999999abc", &end_p, 0)); in CheckStrToInt()