mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 04:41:16 +00:00
Use Kibibyte units to be consistent with syncthing.
This commit is contained in:
parent
1a85bd54e7
commit
97a324b4b5
2 changed files with 12 additions and 12 deletions
|
@ -93,14 +93,14 @@ public class RestApiTest extends AndroidTestCase {
|
|||
|
||||
@SmallTest
|
||||
public void testReadableFileSize() {
|
||||
assertEquals("1 MB", RestApi.readableFileSize(getContext(), 1048576));
|
||||
assertEquals("1 GB", RestApi.readableFileSize(getContext(), 1073741824));
|
||||
assertEquals("1 MiB", RestApi.readableFileSize(getContext(), 1048576));
|
||||
assertEquals("1 GiB", RestApi.readableFileSize(getContext(), 1073741824));
|
||||
}
|
||||
|
||||
@SmallTest
|
||||
public void testGetReadableTransferRate() {
|
||||
assertEquals("1 Mb/s", RestApi.readableTransferRate(getContext(), 1048576));
|
||||
assertEquals("1 Gb/s", RestApi.readableTransferRate(getContext(), 1073741824));
|
||||
assertEquals("1 Mib/s", RestApi.readableTransferRate(getContext(), 1048576));
|
||||
assertEquals("1 Gib/s", RestApi.readableTransferRate(getContext(), 1073741824));
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
|
|
|
@ -321,19 +321,19 @@ Please report any problems you encounter via Github.</string>
|
|||
<!-- Strings representing units for file sizes, from smallest to largest -->
|
||||
<string-array name="file_size_units">
|
||||
<item>B</item>
|
||||
<item>KB</item>
|
||||
<item>MB</item>
|
||||
<item>GB</item>
|
||||
<item>TB</item>
|
||||
<item>KiB</item>
|
||||
<item>MiB</item>
|
||||
<item>GiB</item>
|
||||
<item>TiB</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Strings representing units for transfer rates, from smallest to largest -->
|
||||
<string-array name="transfer_rate_units">
|
||||
<item>b/s</item>
|
||||
<item>Kb/s</item>
|
||||
<item>Mb/s</item>
|
||||
<item>Gb/s</item>
|
||||
<item>Tb/s</item>
|
||||
<item>Kib/s</item>
|
||||
<item>Mib/s</item>
|
||||
<item>Gib/s</item>
|
||||
<item>Tib/s</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Possible folder states -->
|
||||
|
|
Loading…
Reference in a new issue