Skip to content
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

Adding missed unit test cases #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

CXWorks
Copy link

@CXWorks CXWorks commented Jul 14, 2023

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).
For the first 4 cases, you can easily find their error locations and for the last case, the untested area is:

humantime/src/duration.rs

Lines 181 to 187 in 12ce6f5

'0'..='9' => {
self.parse_unit(n, start, off)?;
n = c as u64 - '0' as u64;
continue 'outer;
}
c if c.is_whitespace() => break,
'a'..='z' | 'A'..='Z' => {}

including both the error cases and correct path.

Thanks again for reviewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants