diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2011-12-18 11:42:19 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2011-12-18 11:42:19 +0100 |
commit | 0ffc68892d75a9d6570354d0f04b0cfda7d978cd (patch) | |
tree | 1ad32112381b223a8974604021ba055b13f21c52 /tests/src/cgeo | |
parent | 74967130b8eab2f957fa252bfa31aded93b941ef (diff) | |
download | cgeo-0ffc68892d75a9d6570354d0f04b0cfda7d978cd.zip cgeo-0ffc68892d75a9d6570354d0f04b0cfda7d978cd.tar.gz cgeo-0ffc68892d75a9d6570354d0f04b0cfda7d978cd.tar.bz2 |
performance: faster opening of lists (~20%), better scrolling
* avoid duplicate distance calculation in distance sorter
* avoid String.format() wherever possible
* avoid lookups with constant values in database
* avoid reinitializing database all the time
Diffstat (limited to 'tests/src/cgeo')
-rw-r--r-- | tests/src/cgeo/geocaching/cgBaseTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/cgBaseTest.java b/tests/src/cgeo/geocaching/cgBaseTest.java index 535833e..94f1a9a 100644 --- a/tests/src/cgeo/geocaching/cgBaseTest.java +++ b/tests/src/cgeo/geocaching/cgBaseTest.java @@ -79,4 +79,8 @@ public class cgBaseTest extends AndroidTestCase { } } + public static void testHumanDistance() { + assertEquals("?", cgBase.getHumanDistance(null)); + assertEquals("123 km", cgBase.getHumanDistance(123.456f)); + } }
\ No newline at end of file |