/cts/tests/tests/util/src/android/util/cts/ |
D | SparseLongArrayTest.java | 36 private static final int[] KEYS = {12, 23, 4, 6, 8, 1, 3, -12, 0, -3, 11, 14, -23}; field in SparseLongArrayTest 50 sparseArray.put(KEYS[i], VALUES[i]); in testSparseArrayWithDefaultCapacity() 55 assertEquals(i, sparseArray.get(KEYS[i])); in testSparseArrayWithDefaultCapacity() 59 assertEquals(sparseArray.indexOfValue(VALUES[i]), sparseArray.indexOfKey(KEYS[i])); in testSparseArrayWithDefaultCapacity() 63 int existKey = KEYS[0]; in testSparseArrayWithDefaultCapacity() 85 assertEquals(VALUES[1], sparseArray.get(KEYS[1])); in testSparseArrayWithDefaultCapacity() 87 sparseArray.delete(KEYS[1]); in testSparseArrayWithDefaultCapacity() 89 sparseArray.get(KEYS[1], VALUE_FOR_NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 93 assertEquals(VALUES[2], sparseArray.get(KEYS[2])); in testSparseArrayWithDefaultCapacity() 95 sparseArray.delete(KEYS[2]); in testSparseArrayWithDefaultCapacity() [all …]
|
D | LongSparseArrayTest.java | 38 private static final long[] KEYS = {12, 23, 4, 6, 8, 1, 3, -12, 0, -3, 11, 14, -23}; field in LongSparseArrayTest 52 sparseArray.put(KEYS[i], VALUES[i]); in testSparseArrayWithDefaultCapacity() 57 assertEquals(new Integer(i), sparseArray.get(KEYS[i])); in testSparseArrayWithDefaultCapacity() 61 assertEquals(sparseArray.indexOfValue(VALUES[i]), sparseArray.indexOfKey(KEYS[i])); in testSparseArrayWithDefaultCapacity() 65 long existKey = KEYS[0]; in testSparseArrayWithDefaultCapacity() 91 assertEquals(VALUES[1], sparseArray.get(KEYS[1])); in testSparseArrayWithDefaultCapacity() 93 sparseArray.delete(KEYS[1]); in testSparseArrayWithDefaultCapacity() 95 sparseArray.get(KEYS[1], VALUE_FOR_NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 99 assertEquals(VALUES[2], sparseArray.get(KEYS[2])); in testSparseArrayWithDefaultCapacity() 101 sparseArray.remove(KEYS[2]); in testSparseArrayWithDefaultCapacity() [all …]
|
D | SparseArrayTest.java | 35 private static final int[] KEYS = {12, 23, 4, 6, 8, 1, 3, -12, 0, -3, 11, 14, -23}; field in SparseArrayTest 49 sparseArray.put(KEYS[i], VALUES[i]); in testSparseArrayWithDefaultCapacity() 54 assertEquals(new Integer(i), sparseArray.get(KEYS[i])); in testSparseArrayWithDefaultCapacity() 58 assertEquals(sparseArray.indexOfValue(VALUES[i]), sparseArray.indexOfKey(KEYS[i])); in testSparseArrayWithDefaultCapacity() 62 int existKey = KEYS[0]; in testSparseArrayWithDefaultCapacity() 88 assertEquals(VALUES[1], sparseArray.get(KEYS[1])); in testSparseArrayWithDefaultCapacity() 90 sparseArray.delete(KEYS[1]); in testSparseArrayWithDefaultCapacity() 92 sparseArray.get(KEYS[1], VALUE_FOR_NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 96 assertEquals(VALUES[2], sparseArray.get(KEYS[2])); in testSparseArrayWithDefaultCapacity() 98 sparseArray.remove(KEYS[2]); in testSparseArrayWithDefaultCapacity() [all …]
|
D | SparseBooleanArrayTest.java | 33 private static final int[] KEYS = {12, 23, 4, 6, 8, 1, 3, -12, 0, -3, 11, 14, -23}; field in SparseBooleanArrayTest 46 sparseBooleanArray.put(KEYS[i], VALUES[i]); in testSparseBooleanArrayWithDefaultCapacity() 50 assertEquals(VALUES[i], sparseBooleanArray.get(KEYS[i])); in testSparseBooleanArrayWithDefaultCapacity() 57 keyIndex = sparseBooleanArray.indexOfKey(KEYS[i]); in testSparseBooleanArrayWithDefaultCapacity() 64 int existKey = KEYS[0]; in testSparseBooleanArrayWithDefaultCapacity() 86 assertEquals(VALUES[1], sparseBooleanArray.get(KEYS[1])); in testSparseBooleanArrayWithDefaultCapacity() 88 sparseBooleanArray.delete(KEYS[1]); in testSparseBooleanArrayWithDefaultCapacity() 90 sparseBooleanArray.get(KEYS[1], VALUE_FOR_NON_EXISTED_KEY)); in testSparseBooleanArrayWithDefaultCapacity() 103 sparseBooleanArray.put(KEYS[i], VALUES[i]); in testSparseBooleanArrayWithSpecifiedCapacity() 107 assertEquals(VALUES[i], sparseBooleanArray.get(KEYS[i])); in testSparseBooleanArrayWithSpecifiedCapacity() [all …]
|
D | SparseIntArrayTest.java | 33 private static final int[] KEYS = {12, 23, 4, 6, 8, 1, 3, -12, 0, -3, 11, 14, -23}; field in SparseIntArrayTest 45 sparseIntArray.put(KEYS[i], VALUES[i]); in testSparseIntArrayWithDefaultCapacity() 49 assertEquals(VALUES[i], sparseIntArray.get(KEYS[i])); in testSparseIntArrayWithDefaultCapacity() 53 sparseIntArray.indexOfKey(KEYS[i])); in testSparseIntArrayWithDefaultCapacity() 57 int existKey = KEYS[0]; in testSparseIntArrayWithDefaultCapacity() 78 assertEquals(VALUES[1], sparseIntArray.get(KEYS[1])); in testSparseIntArrayWithDefaultCapacity() 80 sparseIntArray.delete(KEYS[1]); in testSparseIntArrayWithDefaultCapacity() 82 sparseIntArray.get(KEYS[1], VALUE_FOR_NON_EXISTED_KEY)); in testSparseIntArrayWithDefaultCapacity() 95 sparseIntArray.put(KEYS[i], VALUES[i]); in testSparseIntArrayWithSpecifiedCapacity() 99 assertEquals(VALUES[i], sparseIntArray.get(KEYS[i])); in testSparseIntArrayWithSpecifiedCapacity() [all …]
|
D | ArrayMapTest.java | 80 static int[] KEYS = new int[] { field in ArrayMapTest 361 ControlledHash key = KEYS[i] < 0 ? null : new ControlledHash(KEYS[i]); in testBasicArrayMap() 362 String strKey = KEYS[i] < 0 ? null : Integer.toString(KEYS[i]); in testBasicArrayMap()
|
D | ArraySetTest.java | 76 private static int[] KEYS = new int[] { field in ArraySetTest 232 assertEquals("OPS and KEYS must be equal length", OPS.length, KEYS.length); in testTest() 241 ControlledHash key = KEYS[i] < 0 ? null : new ControlledHash(KEYS[i]); in testBasicArraySet()
|