Unverified Commit 67fac85e authored by Milo Yip's avatar Milo Yip Committed by GitHub

Merge pull request #1373 from lelit/issue1368

Add test case on kParseNumbersAsStringsFlag being able to load big ints
parents 663f076c 91d50c84
......@@ -1975,6 +1975,17 @@ TEST(Reader, NumbersAsStrings) {
Reader reader;
EXPECT_TRUE(reader.Parse<kParseNumbersAsStringsFlag>(s, h));
}
{
char n1e319[321]; // '1' followed by 319 '0'
n1e319[0] = '1';
for (int i = 1; i < 320; i++)
n1e319[i] = '0';
n1e319[320] = '\0';
StringStream s(n1e319);
NumbersAsStringsHandler h(n1e319);
Reader reader;
EXPECT_TRUE(reader.Parse<kParseNumbersAsStringsFlag>(s, h));
}
}
template <unsigned extraFlags>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment