diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/test/RegExPerformanceTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/test/RegExPerformanceTest.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java index 0e2619d..3075d0e 100644 --- a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java +++ b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java @@ -68,12 +68,7 @@ public class RegExPerformanceTest extends TestCase { public final static Pattern PATTERN_DESCRIPTION = Pattern.compile("<span id=\"ctl00_ContentBody_LongDescription\">(.*?)</span>[^<]*</div>[^<]*<p>[^<]*</p>[^<]*<p>[^<]*<strong>\\W*Additional Hints</strong>"); - public final static List<MockedCache> MOCKED_CACHES = new ArrayList<MockedCache>(); - static { - MOCKED_CACHES.add(new GC2CJPF()); - MOCKED_CACHES.add(new GC1ZXX2()); - MOCKED_CACHES.add(new GC2JVEH()); - } + public final static MockedCache[] MOCKED_CACHES = { new GC2CJPF(), new GC1ZXX2(), new GC2JVEH() }; public static void testRegEx() { List<String> output = doTheTests(10); @@ -115,7 +110,7 @@ public class RegExPerformanceTest extends TestCase { diff2 = parse(page, p2, iterations); output.add("Time pattern 2:\t" + diff2 + " ms"); } - Float reduction = new Float((float) diff2 * 100 / diff1); + float reduction = (float) diff2 * 100 / diff1; output.add("New runtime:\t" + String.format("%.1f", reduction) + "%\n"); } |
