-
Notifications
You must be signed in to change notification settings - Fork 314
Add base64 tests #3220
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
Add base64 tests #3220
Conversation
Based on feedback from Azure#3214
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.
Pull Request Overview
This PR adds comprehensive test coverage for the base64 encoding/decoding functionality in the typespec_client_core
crate. The tests validate both standard and URL-safe base64 variants, including edge cases and serde integration.
Key changes:
- Added a test module with 16 test functions covering encoding, decoding, roundtrip operations, and serde integration
- Tests validate both standard and URL-safe base64 variants with optional value handling
- Includes edge case testing for empty inputs, single characters, and invalid input handling
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.
Approving, because all tests are better than no tests (and these tests seem to be reasonably decent).
However there is a hole in the tests that you might consider fixing.
Thought of a few other negative cases while I was at it.
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.
👀
Based on feedback from #3214