-
Notifications
You must be signed in to change notification settings - Fork 731
JSON assertions did not properly handle floats, doubles and unsigned … #3105
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
JSON assertions did not properly handle floats, doubles and unsigned … #3105
Conversation
dc73057 to
fcb1c0d
Compare
Pull Request Test Coverage Report for Build 18187186552Details
💛 - Coveralls |
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
fcb1c0d to
965afe7
Compare
965afe7 to
bf23e22
Compare
jnyrup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small int32 -> numeric value corrections
bf23e22 to
cc443c0
Compare
cc443c0 to
3ffeed2
Compare
This PR fixes a bug in JSON assertions where the library wasn't properly handling certain numeric types during comparisons. The core issue was that the JSON conversion logic only checked for
intanddoublevalues, but missed other important numeric types like unsigned integers (uint,ulong), signed long integers (), and floats (float).longThe fix adds support for these missing numeric types by extending the conversion step to handle
uint, ,ulong, andfloatvalues. Additionally, it introduces a newIsNumeric()helper method that properly identifies all numeric JSON values by checking for ,ulong, ordoubletypes.long``longThanks to @jnyrup for the discovery.