Commit 152c2eff authored by miloyip@gmail.com's avatar miloyip@gmail.com

Fixed Issue 41 Incorrect parsing of unsigned int number types

git-svn-id: https://rapidjson.googlecode.com/svn/trunk@72 c5894555-1306-4e8d-425f-1f6f381ee07c
parent 22ddf37c
......@@ -547,7 +547,7 @@ private:
kTrueFlag = kTrueType | kBoolFlag,
kFalseFlag = kFalseType | kBoolFlag,
kNumberIntFlag = kNumberType | kNumberFlag | kIntFlag | kInt64Flag,
kNumberUintFlag = kNumberType | kNumberFlag | kUintFlag | kUint64Flag,
kNumberUintFlag = kNumberType | kNumberFlag | kUintFlag | kUint64Flag | kInt64Flag,
kNumberInt64Flag = kNumberType | kNumberFlag | kInt64Flag,
kNumberUint64Flag = kNumberType | kNumberFlag | kUint64Flag,
kNumberDoubleFlag = kNumberType | kNumberFlag | kDoubleFlag,
......
......@@ -189,6 +189,7 @@ TEST(Value, Uint) {
z = 2147483648u; // 2^31, cannot cast as int
EXPECT_EQ(2147483648u, z.GetUint());
EXPECT_FALSE(z.IsInt());
EXPECT_TRUE(z.IsInt64()); // Issue 41: Incorrect parsing of unsigned int number types
}
TEST(Value, Int64) {
......
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