@Test
public void testLeastRecentlyUsedAttributeSetIsRemovedFirst() {
final Bitmap leastRecentlyUsed = ShadowBitmap.createBitmap(100, 100, Bitmap.Config.ALPHA_8);
final Bitmap other = ShadowBitmap.createBitmap(1000, 1000, Bitmap.Config.RGB_565);
final Bitmap mostRecentlyUsed = ShadowBitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
strategy.get(100, 100, Bitmap.Config.ALPHA_8);
strategy.get(1000, 1000, Bitmap.Config.RGB_565);
strategy.get(100, 100, Bitmap.Config.ARGB_8888);
strategy.put(other);
strategy.put(leastRecentlyUsed);
strategy.put(mostRecentlyUsed);
Bitmap removed = strategy.removeLast();
assertEquals(
"Expected=" + strategy.logBitmap(leastRecentlyUsed) + " got=" + strategy.logBitmap(removed),
leastRecentlyUsed, removed);
}
AttributeStrategyTest.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录