RustCrypto / hashes

Collection of cryptographic hash functions written in pure Rust
1.81k stars 245 forks source link

Add missing tests in sha2 #603

Closed CXWorks closed 2 weeks ago

CXWorks commented 1 month ago

Hi,

Thanks for your time & patience to review this PR.

By examine the existing code, I found some unit tests(7 in total) can be added to improve the repo sha2 module's overall unit test coverage(this project is already been well tested). Each of the unit test is testing a different target function for better coverage.

Thanks again for reviewing.

CXWorks commented 1 month ago

I am not sure we need these tests to artificially boost test coverage. A proper coverage measurement should merge several runs which trigger different backends, e.g. by using the crate configuration options.

Thanks for your comments and good question. Honestly we don't know a good answer for this question or if this project has a testing coverage plan, but we are happy to get different feedbacks

newpavlov commented 2 weeks ago

Closing this PR since the added test do not test much.