Lines Matching refs:ParseInteger
181 uint64 ParseInteger(const string& text) { in ParseInteger() function in google::protobuf::io::__anond6597bd50111::TokenizerTest
183 EXPECT_TRUE(Tokenizer::ParseInteger(text, kuint64max, &result)); in ParseInteger()
725 TEST_F(TokenizerTest, ParseInteger) { in TEST_F() argument
726 EXPECT_EQ(0, ParseInteger("0")); in TEST_F()
727 EXPECT_EQ(123, ParseInteger("123")); in TEST_F()
728 EXPECT_EQ(0xabcdef12u, ParseInteger("0xabcdef12")); in TEST_F()
729 EXPECT_EQ(0xabcdef12u, ParseInteger("0xABCDEF12")); in TEST_F()
730 EXPECT_EQ(kuint64max, ParseInteger("0xFFFFFFFFFFFFFFFF")); in TEST_F()
731 EXPECT_EQ(01234567, ParseInteger("01234567")); in TEST_F()
732 EXPECT_EQ(0X123, ParseInteger("0X123")); in TEST_F()
735 EXPECT_EQ(0, ParseInteger("0x")); in TEST_F()
740 EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("zxy", kuint64max, &i), in TEST_F()
742 EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("1.2", kuint64max, &i), in TEST_F()
744 EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("08", kuint64max, &i), in TEST_F()
746 EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("0xg", kuint64max, &i), in TEST_F()
748 EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("-1", kuint64max, &i), in TEST_F()
753 EXPECT_TRUE (Tokenizer::ParseInteger("0", 0, &i)); in TEST_F()
754 EXPECT_FALSE(Tokenizer::ParseInteger("1", 0, &i)); in TEST_F()
755 EXPECT_TRUE (Tokenizer::ParseInteger("1", 1, &i)); in TEST_F()
756 EXPECT_TRUE (Tokenizer::ParseInteger("12345", 12345, &i)); in TEST_F()
757 EXPECT_FALSE(Tokenizer::ParseInteger("12346", 12345, &i)); in TEST_F()
758 EXPECT_TRUE (Tokenizer::ParseInteger("0xFFFFFFFFFFFFFFFF" , kuint64max, &i)); in TEST_F()
759 EXPECT_FALSE(Tokenizer::ParseInteger("0x10000000000000000", kuint64max, &i)); in TEST_F()