-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix de_num for unsigned number #43
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for the PR, but this part of the code isn't buggy. The reason here is to always emit a single representation for any integer. The rule is the following:
As you can see the |
I'll add this to the |
Thanks, but what's the proper way to make a unit test for UInt number serde? Eg in the code: https://github.com/jonhoo/msql-srv/blob/1c112267ce568ac83088e13861bf4911f8df9793/src/value/decode.rs#L292-L329 I serialize a u8 number 1 to binary and then deserialize it into a Value with
|
You can compare the normalized values, where "normalized" means that it follows the rule stated above. Btw, why do you need to test |
I bump up the version of |
I still take the code as buggy, since I tell the I don't understand why it force return signed number. |
May I ask you why did you ignore the Text Protocol in you tests? |
Because |
+1, I am using mysql_common & msql-srv. I've spent a few hours to find a problem, lol. |
Hmm.. Seems like I need to look at this from wider perspective, but still don't want to encode all of u8, i8, u16, i16, ... @ovr, could you please describe how exactly this problem hit you? |
No description provided.