Home
last modified time | relevance | path

Searched refs:constantWeigher (Results 1 – 10 of 10) sorted by relevance

/external/guava/android/guava-tests/test/com/google/common/cache/
DCacheEvictionTest.java19 import static com.google.common.cache.TestingWeighers.constantWeigher;
53 CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader); in testEviction_setMaxSegmentWeight()
77 .weigher(constantWeigher(2)) in testEviction_maxWeightOneSegment()
114 .weigher(constantWeigher(2)) in testEviction_maxWeight()
249 .weigher(constantWeigher(Integer.MAX_VALUE)) in testEviction_overflow()
DTestingWeighers.java25 static Weigher<Object, Object> constantWeigher(int constant) { in constantWeigher() method in TestingWeighers
DCacheBuilderTest.java24 import static com.google.common.cache.TestingWeighers.constantWeigher;
220 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().weigher(constantWeigher(42)); in testWeigher_withoutMaximumWeight()
231 CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1); in testWeigher_withMaximumSize()
236 CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)); in testWeigher_withMaximumSize()
DCacheBuilderSpecTest.java20 import static com.google.common.cache.TestingWeighers.constantWeigher;
473 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withWeigher()
487 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withWeigher()
DLocalCacheTest.java27 import static com.google.common.cache.TestingWeighers.constantWeigher;
443 .weigher(constantWeigher(1))); in checkMaximumSize()
/external/guava/guava-tests/test/com/google/common/cache/
DCacheEvictionTest.java19 import static com.google.common.cache.TestingWeighers.constantWeigher;
53 CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader); in testEviction_setMaxSegmentWeight()
77 .weigher(constantWeigher(2)) in testEviction_maxWeightOneSegment()
114 .weigher(constantWeigher(2)) in testEviction_maxWeight()
249 .weigher(constantWeigher(Integer.MAX_VALUE)) in testEviction_overflow()
DTestingWeighers.java25 static Weigher<Object, Object> constantWeigher(int constant) { in constantWeigher() method in TestingWeighers
DCacheBuilderTest.java24 import static com.google.common.cache.TestingWeighers.constantWeigher;
220 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().weigher(constantWeigher(42)); in testWeigher_withoutMaximumWeight()
231 CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1); in testWeigher_withMaximumSize()
236 CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)); in testWeigher_withMaximumSize()
DCacheBuilderSpecTest.java20 import static com.google.common.cache.TestingWeighers.constantWeigher;
473 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withWeigher()
487 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withWeigher()
DLocalCacheTest.java27 import static com.google.common.cache.TestingWeighers.constantWeigher;
440 .weigher(constantWeigher(1))); in checkMaximumSize()