mgeisler / textwrap

An efficient and powerful Rust library for word wrapping text.
MIT License
446 stars 44 forks source link

Add unit test for uncovered regions #514

Closed CXWorks closed 1 year ago

CXWorks commented 1 year ago

Hi,

Thanks for your time & patience to review this PR.

We are researchers focusing on Rust unit tests. By examine the existing code, we found a unit test can be added to improve the repo's overall unit test coverage(this project is already been well tested). We only manually changed our assert statements to make it consistent with existing unit tests and the newly covered code region is: https://github.com/mgeisler/textwrap/blob/872f221fede7aa78e730bb7895074455269a431a/src/refill.rs#L77-L80 Thanks again for reviewing.

CXWorks commented 1 year ago

Thanks for running the CI check, it seems one of them failed due to nightly toolchain issue, is there anything I can do?

mgeisler commented 1 year ago

Thanks for running the CI check, it seems one of them failed due to nightly toolchain issue, is there anything I can do?

I restarted the jobs — you could have done the same by pushing a different commit to the branch.

The PR looks good, great job at finding a test case to improve the coverage like this. I left two small comments about making the test case more human-friendly.

CXWorks commented 1 year ago

Thanks for your feedback & comments, it's really helpful.