diff options
| -rw-r--r-- | tests/src/cgeo/geocaching/cgBaseTest.java | 2 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/test/RegExPerformanceTest.java | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/tests/src/cgeo/geocaching/cgBaseTest.java b/tests/src/cgeo/geocaching/cgBaseTest.java index b6ad561..d0a7b98 100644 --- a/tests/src/cgeo/geocaching/cgBaseTest.java +++ b/tests/src/cgeo/geocaching/cgBaseTest.java @@ -156,7 +156,7 @@ public class cgBaseTest extends AbstractResourceInstrumentationTestCase { } public static cgCache createCache(int index) { - final MockedCache mockedCache = RegExPerformanceTest.MOCKED_CACHES.get(index); + final MockedCache mockedCache = RegExPerformanceTest.MOCKED_CACHES[index]; // to get the same results we have to use the date format used when the mocked data was created String oldCustomDate = Settings.getGcCustomDate(); diff --git a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java index 552c225..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); |
