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

Tests: Use custom tests to verify operations on empty slices are no-ops. #299

Closed
wants to merge 2 commits into from

Conversation

briansmith
Copy link
Contributor

Modify the custom tests so that they would have detected and prevented the issue fixed in #298.

@briansmith
Copy link
Contributor Author

The first commit refactors tests/custom.rs so that the common tests are also run. The second commit adds the check for the empty slice short-circuiting logic.

Copy link
Member

@josephlr josephlr left a comment

Choose a reason for hiding this comment

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

I think this is a good change (both running the common tests and added the empty buffer check). However, is there a reason the code in custom_kat.rs and custom_common/mod.rs can't just be in tests/custom.rs ? Give that we don't reuse the custom code, I'm not sure if splitting up the files makes sense.

tests/custom_kat.rs Show resolved Hide resolved
tests/custom.rs Outdated Show resolved Hide resolved
@josephlr
Copy link
Member

Closing in favor of #300 PTAL.

@josephlr josephlr closed this Oct 22, 2022
josephlr added a commit that referenced this pull request Oct 22, 2022
Tests: Use custom tests to verify operations on empty slices are no-ops.

Reworking of #299 to keep our custom tests in a single file (and keep things better organized in general).
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.

None yet

2 participants