-
Notifications
You must be signed in to change notification settings - Fork 53
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
Assumed value implies length #40
Comments
Thanks for the report. The length should be explicit so the format is understandable when reading the code. If an A runtime warning if |
I can't think of a scenario where a static zero is ever an okay length to file read on a fixed string. Setting a runtime warning for |
Note the length should be specified with |
I wrote some test code to learn bindata and I got an error I wasn't expecting.
I had assumed, as the documentation had implied for value (and therefore implied for asserted_value), that the identity string was a fixed length constant of three letters for the purposes of reading, writing, and asserting. Writing went great but reading resulted in a length of zero. I know adding the "read_length" attirbute will fix the issue but it took a trace of the code to figure that out. Doesn't seem intuitive. I would be happy to write a patch if you agree that this is not the expected behavior. Thank you for your review. Here's the code:
The text was updated successfully, but these errors were encountered: