@@ -0,0 +1,2443 @@
+package org.osmdroid.tileprovider;%0A%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.BitmapFactory;%0Aimport android.graphics.Color;%0Aimport android.os.Build;%0Aimport android.test.AndroidTestCase;%0A%0A%0Apublic class BitmapPoolTest extends AndroidTestCase %7B%0A%0A    private BitmapPool bitmapPool;%0A%0A    private Bitmap bitmap;%0A    private Bitmap differentSizeBitmap;%0A%0A    @Override%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A%0A        bitmapPool = BitmapPool.getInstance();%0A%0A        bitmap = Bitmap.createBitmap(256, 256, Bitmap.Config.ARGB_8888);%0A        differentSizeBitmap = Bitmap.createBitmap(128, 128, Bitmap.Config.ARGB_8888);%0A    %7D%0A%0A    @Override%0A    protected void tearDown() throws Exception %7B%0A        super.tearDown();%0A        bitmapPool.clearBitmapPool();%0A    %7D%0A%0A    public void testThatBitmapIsReusedForSameSize() %7B%0A        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.HONEYCOMB) %7B%0A            bitmapPool.clearBitmapPool();%0A            bitmapPool.returnDrawableToPool(new ReusableBitmapDrawable(bitmap));%0A%0A            BitmapFactory.Options options = new BitmapFactory.Options();%0A            bitmapPool.applyReusableOptions(options, bitmap.getWidth(), bitmap.getHeight());%0A%0A            Bitmap testBitmap = options.inBitmap;%0A            assertNotNull(testBitmap);%0A        %7D%0A    %7D%0A%0A    public void testThatBitmapIsNotReusedForDifferentSize() %7B%0A        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.HONEYCOMB) %7B%0A            bitmapPool.clearBitmapPool();%0A            bitmapPool.returnDrawableToPool(new ReusableBitmapDrawable(bitmap));%0A%0A            BitmapFactory.Options options = new BitmapFactory.Options();%0A            bitmapPool.applyReusableOptions(%0A                    options, differentSizeBitmap.getWidth(), differentSizeBitmap.getHeight());%0A%0A            Bitmap testBitmap = options.inBitmap;%0A            assertNull(testBitmap);%0A        %7D%0A    %7D%0A%0A    public void testThatBitmapPoolIsCleared() %7B%0A        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.HONEYCOMB) %7B%0A            bitmapPool.clearBitmapPool();%0A            bitmapPool.returnDrawableToPool(new ReusableBitmapDrawable(bitmap));%0A%0A            bitmapPool.clearBitmapPool();%0A%0A            BitmapFactory.Options options = new BitmapFactory.Options();%0A            bitmapPool.applyReusableOptions(options, bitmap.getWidth(), bitmap.getHeight());%0A%0A            Bitmap testBitmap = options.inBitmap;%0A            assertNull(testBitmap);%0A        %7D%0A    %7D%0A%7D%0A

add basic tests