diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2011-10-22 12:54:08 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2011-10-22 12:54:08 +0200 |
commit | 2af071bce981c56fa0b58eef8c5883e78e93abf0 (patch) | |
tree | 90f47a2165d293fa1e20f185659eb617a1b29aa3 /tests/src/cgeo/geocaching/test/WhitespaceTest.java | |
parent | b5f44be1ce480666e3a72a0ebd0c7f52ada19a28 (diff) | |
download | cgeo-2af071bce981c56fa0b58eef8c5883e78e93abf0.zip cgeo-2af071bce981c56fa0b58eef8c5883e78e93abf0.tar.gz cgeo-2af071bce981c56fa0b58eef8c5883e78e93abf0.tar.bz2 |
no more warnings in unit tests
* log performance results as info only
* avoid some BufferedReader warnings
Diffstat (limited to 'tests/src/cgeo/geocaching/test/WhitespaceTest.java')
-rw-r--r-- | tests/src/cgeo/geocaching/test/WhitespaceTest.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/src/cgeo/geocaching/test/WhitespaceTest.java b/tests/src/cgeo/geocaching/test/WhitespaceTest.java index e7639b6..bb9f0e0 100644 --- a/tests/src/cgeo/geocaching/test/WhitespaceTest.java +++ b/tests/src/cgeo/geocaching/test/WhitespaceTest.java @@ -26,9 +26,9 @@ public class WhitespaceTest extends AndroidTestCase { @Override protected void setUp() throws Exception { - final StringBuffer buffer = new StringBuffer(); + final StringBuffer buffer = new StringBuffer(4096); final InputStream is = this.getClass().getResourceAsStream("/cgeo/geocaching/test/mock/GC2CJPF.html"); - final BufferedReader br = new BufferedReader(new InputStreamReader(is)); + final BufferedReader br = new BufferedReader(new InputStreamReader(is), 4096); String line = null; @@ -78,7 +78,7 @@ public class WhitespaceTest extends AndroidTestCase { String result = matcher.replaceAll(" ").trim(); final long end = System.currentTimeMillis(); assertEquals(111956, result.length()); - Log.w(Settings.tag, (end - start) + " ms regex"); + Log.d(Settings.tag, (end - start) + " ms regex"); } public void testReplaceAll() { @@ -86,7 +86,7 @@ public class WhitespaceTest extends AndroidTestCase { String result = data.replaceAll("\\s+", " "); final long end = System.currentTimeMillis(); assertEquals(111958, result.length()); - Log.w(Settings.tag, (end - start) + " ms replaceAll"); + Log.d(Settings.tag, (end - start) + " ms replaceAll"); } public void testActualImplementation() { @@ -95,7 +95,7 @@ public class WhitespaceTest extends AndroidTestCase { result = BaseUtils.replaceWhitespace(data); final long end = System.currentTimeMillis(); assertEquals(111957, result.length()); - Log.w(Settings.tag, (end - start) + " ms actual implementation"); + Log.d(Settings.tag, (end - start) + " ms actual implementation"); } public void testManually() { @@ -104,7 +104,7 @@ public class WhitespaceTest extends AndroidTestCase { result = replaceWhitespaceManually(data); final long end = System.currentTimeMillis(); assertEquals(111957, result.length()); - Log.w(Settings.tag, (end - start) + " ms manually"); + Log.d(Settings.tag, (end - start) + " ms manually"); } public void testStringUtils() { @@ -113,6 +113,6 @@ public class WhitespaceTest extends AndroidTestCase { result = replaceWhitespaceStringUtils(data); final long end = System.currentTimeMillis(); assertEquals(111956, result.length()); - Log.w(Settings.tag, (end - start) + " ms StringUtils"); + Log.d(Settings.tag, (end - start) + " ms StringUtils"); } -} +}
\ No newline at end of file |