Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number fixes #1053

Merged
merged 13 commits into from
Nov 9, 2019
Merged

Number fixes #1053

merged 13 commits into from
Nov 9, 2019

Conversation

baylesj
Copy link
Contributor

@baylesj baylesj commented Oct 16, 2019

Found out today that our jsontestrunner hasn't been testing our CharReader, only the legacy Reader. I rushed out a fix for this, as part of cleaning up the logic for parsing numbers.

@dota17
Copy link
Member

dota17 commented Oct 16, 2019

+1 from me.

Copy link
Contributor

@cdunn2001 cdunn2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked every line in this PR. Nice. LGTM.

decoded = -Value::LargestInt(value / 10) - last_digit;
} else if (value > Value::LargestUInt(Value::maxLargestInt)) {
decoded = -Value::LargestInt(value / 10) * 10 - last_digit;
} else if (value <= Value::LargestUInt(Value::maxLargestInt)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! This was a bug? Good catch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wonder the bug, is there a example code to reproduce the bug?

@cdunn2001
Copy link
Contributor

Found out today that our jsontestrunner hasn't been testing our CharReader, only the legacy Reader.

I think we should prioritize that over all other work. And as implies @kimsey0 says in #1062, we really should separate the old Reader tests from CharReader tests, so we can alter them independently. We are more limited in the changes we can make to old Reader.

@cdunn2001
Copy link
Contributor

I think this only needs clang-format.

@kimsey0
Copy link
Contributor

kimsey0 commented Nov 8, 2019

@baylesj: Would you clang-format this?

Fix conflict: which has been modified in #1084
@dota17 dota17 merged commit 645cd04 into master Nov 9, 2019
@dota17
Copy link
Member

dota17 commented Nov 9, 2019

@kimsey0 Done.

@baylesj if you don't need branch number-fixes anymore, please delete it.

@dota17 dota17 deleted the number-fixes branch March 31, 2020 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants