-
Notifications
You must be signed in to change notification settings - Fork 366
Update dependency org.robolectric:robolectric to v4.16 #5222
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,8 @@ class AndroidFileSizeFormatter @Inject constructor( | |
| } else { | ||
| // First convert the size | ||
| when { | ||
| fileSize < 1024 -> fileSize | ||
| fileSize <= 1 -> fileSize | ||
| fileSize < 1024 -> fileSize * 1000 / 1024 | ||
| fileSize < 1024 * 1024 -> fileSize * 1000 / 1024 | ||
| fileSize < 1024 * 1024 * 1024 -> fileSize * 1000 / 1024 * 1000 / 1024 | ||
| else -> fileSize * 1000 / 1024 * 1000 / 1024 * 1000 / 1024 | ||
|
|
@@ -40,6 +41,6 @@ class AndroidFileSizeFormatter @Inject constructor( | |
| Formatter.formatShortFileSize(context, normalizedSize) | ||
| } else { | ||
| Formatter.formatFileSize(context, normalizedSize) | ||
| } | ||
| }.replace("kB", "KB") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this replacement? It seems that
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then I understood the comments on that class and the existing tests backwards, I thought we wanted to keep the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the end did we decide on whether to use 1024 or 1000? I think it was 1000?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I think the replacement is actually OK. I do not think we have a good solution, sadly we do not have access to the flags values |
||
| } | ||
| } | ||
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 think this line can be removed, the line below covers the case
fileSize < 1024