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

More tests for invalid cases #61

Open
5 tasks
pipermerriam opened this issue Apr 24, 2019 · 2 comments
Open
5 tasks

More tests for invalid cases #61

pipermerriam opened this issue Apr 24, 2019 · 2 comments

Comments

@pipermerriam
Copy link
Member

What was wrong?

I believe this library could benefit from more test cases that verify decoding detects invalid serializations.

Here are some cases that come to mind

  • offsets that point beyond the end of the data
  • offsets that are less than a previous offset
  • extra bytes on the end of a list of fixed-sized elements
  • extra bytes between the fixed size elements and the variable sized elements in a vector or container
  • not enough bytes or too many bytes in list/vector/container of fixed size elements

How can it be fixed?

Write these test cases.

@pipermerriam
Copy link
Member Author

Running coverage would also be a good way to see which exception cases are not being excercised.

@jannikluhn
Copy link
Contributor

Yep, I agree that we should have these kinds of tests. But I think they should be part of the YAML test suite so that we don't multiply the effort of writing these tests across all implementations.

carver pushed a commit that referenced this issue Aug 18, 2022
* Add breaking change type to newsfragment

* Move breaking-change -> breaking
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

No branches or pull requests

2 participants