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 some simple unit tests for SettingsHandler #12597
Add some simple unit tests for SettingsHandler #12597
Conversation
Instead of having tests that both encrypt and decrypt and then check the result, I would suggest having tests that do just encryption and just decryption. (Possibly in addition to ones that do both. Additionally, if you're able to, it would be nice to have tests for the edge case implemented in PR #8704. |
Sounds good, I'll make that change! Adding test coverage for the edge case in PR #8704 seems fun. I'll either do that in here or leave it for a follow-up PR depending on how tricky it is. |
Changed (most of) the tests to test encryption and decryption separately. PTAL! I'm not used to writing tests where the input/output data is raw u8 arrays, so let me know if there are any style concerns. I left a TODO for PR #8704. I'd like to add that coverage, but I have pretty limited free time these days, so it might be a while before I get to it. |
Thanks for the review! |
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.
Please squash your commits into one.
7e445a6
to
7793cf6
Compare
Thanks for the review! Commits squashed. |
2a8b1a6
to
691cb29
Compare
691cb29
to
0344ec6
Compare
This is my first attempt at adding unit tests in the Dolphin codebase. It looks like most of the unit test files don't have many comments, but please let me know if test plan comments would be helpful here, or if you have any feedback on the scope or style of the tests.