-
Notifications
You must be signed in to change notification settings - Fork 168
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
Increase test coverage #497
Conversation
🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer. |
5ee4043
to
f7ab373
Compare
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.
LGTM, just one comment.
f7ab373
to
5e18d48
Compare
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.
Good increment, I've suggested some improvements :)
util/encoding/encoding_test.go
Outdated
return 0, nil | ||
} | ||
|
||
func TestReadHexPointError(t *testing.T) { |
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.
I'm going to be annoying on a point that's not common in this codebase, that is a bit of a pet peeve of mine, but which I think is important nonetheless:
This test contains 3 different test cases. When possible, try to have independent unit tests.
- This way, when the test fails, it tells you directly that it's the "reader fails" that fails, you don't have to look up which line this failed at.
- Furthermore, if the 3rd test case passes, you won't be able to tell (from the test results) if everything's grouped in a single test.
- Finally, having separate tests makes them more (trivially) independent of one another, and potentially parallelizable (not that it matters here)
5e18d48
to
38b49c6
Compare
Quality Gate passedIssues Measures |
of util/encoding and util/encryption
This PR increase the test coverage for the modules util/encoding and util/encryption