1
0
Fork 0
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:
Felix Ableitner 2015-03-10 19:38:39 +01:00
parent 1a85bd54e7
commit 97a324b4b5
2 changed files with 12 additions and 12 deletions

View file

@ -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

View file

@ -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 -->