Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 1341) sorted by relevance

12345678910>>...54

/libcore/benchmarks/src/benchmarks/
DInvokeInterface.java28 for (int i = 0; i < nreps; i++) { in timeCall0Concrete()
35 for (int i = 0; i < nreps; i++) { in timeCall0Interface()
42 for (int i = 0; i < nreps; i++) { in timeCall1Interface()
49 for (int i = 0; i < nreps; i++) { in timeCall2Interface()
56 for (int i = 0; i < nreps; i++) { in timeCall3Interface()
63 for (int i = 0; i < nreps; i++) { in timeCall4Interface()
70 for (int i = 0; i < nreps; i++) { in timeCall5Interface()
77 for (int i = 0; i < nreps; i++) { in timeCall6Interface()
84 for (int i = 0; i < nreps; i++) { in timeCall7Interface()
91 for (int i = 0; i < nreps; i++) { in timeCall8Interface()
[all …]
DDeepArrayOpsBenchmark.java35 for (int i = 0; i < arrayLength; i += 14) { in setUp()
36 array[i] = new IntWrapper(i); in setUp()
37 array2[i] = new IntWrapper(i); in setUp()
39 array[i + 1] = new16ElementObjectarray(); in setUp()
40 array2[i + 1] = new16ElementObjectarray(); in setUp()
42 array[i + 2] = new boolean[16]; in setUp()
43 array2[i + 2] = new boolean[16]; in setUp()
45 array[i + 3] = new byte[16]; in setUp()
46 array2[i + 3] = new byte[16]; in setUp()
48 array[i + 4] = new char[16]; in setUp()
[all …]
DMethodInvocationBenchmark.java36 for (int i = 0; i < reps; ++i) { in timeInternalGetter()
44 for (int i = 0; i < reps; ++i) { in timeInternalFieldAccess()
71 for (int i = 0; i < reps; ++i) { in timeStringLength()
79 for (int i = 0; i < reps; ++i) { in timeEmptyStatic()
86 for (int i = 0; i < reps; ++i) { in timeEmptyVirtual()
93 for (int i = 0; i < reps; ++i) { in timeEmptyInterface()
99 private int i; field in MethodInvocationBenchmark.Inner
100 private void privateMethod() { ++i; } in privateMethod()
101 protected void protectedMethod() { ++i; } in protectedMethod()
102 public void publicMethod() { ++i; } in publicMethod()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/
DInputSourceTest.java31 InputSource i = new InputSource(); in testInputSource() local
33 assertNull(i.getByteStream()); in testInputSource()
34 assertNull(i.getCharacterStream()); in testInputSource()
35 assertNull(i.getEncoding()); in testInputSource()
36 assertNull(i.getPublicId()); in testInputSource()
37 assertNull(i.getSystemId()); in testInputSource()
41 InputSource i = new InputSource("Foo"); in testInputSourceString() local
43 assertNull(i.getByteStream()); in testInputSourceString()
44 assertNull(i.getCharacterStream()); in testInputSourceString()
45 assertNull(i.getEncoding()); in testInputSourceString()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicIntegerArrayTest.java34 for (int i = 0; i < SIZE; i++) in testConstructor()
35 assertEquals(0, aa.get(i)); in testConstructor()
56 for (int i = 0; i < a.length; i++) in testConstructor2()
57 assertEquals(a[i], aa.get(i)); in testConstructor2()
102 for (int i = 0; i < SIZE; i++) { in testGetSet()
103 aa.set(i, 1); in testGetSet()
104 assertEquals(1, aa.get(i)); in testGetSet()
105 aa.set(i, 2); in testGetSet()
106 assertEquals(2, aa.get(i)); in testGetSet()
107 aa.set(i, -3); in testGetSet()
[all …]
DAtomicLongArrayTest.java33 for (int i = 0; i < SIZE; i++) in testConstructor()
34 assertEquals(0, aa.get(i)); in testConstructor()
55 for (int i = 0; i < a.length; i++) in testConstructor2()
56 assertEquals(a[i], aa.get(i)); in testConstructor2()
101 for (int i = 0; i < SIZE; i++) { in testGetSet()
102 aa.set(i, 1); in testGetSet()
103 assertEquals(1, aa.get(i)); in testGetSet()
104 aa.set(i, 2); in testGetSet()
105 assertEquals(2, aa.get(i)); in testGetSet()
106 aa.set(i, -3); in testGetSet()
[all …]
DPriorityQueueTest.java46 for (int i = n - 1; i >= 0; i -= 2) in populatedQueue()
47 assertTrue(q.offer(new Integer(i))); in populatedQueue()
48 for (int i = (n & 1); i < n; i += 2) in populatedQueue()
49 assertTrue(q.offer(new Integer(i))); in populatedQueue()
97 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5()
98 ints[i] = new Integer(i); in testConstructor5()
110 for (int i = 0; i < SIZE; ++i) in testConstructor6()
111 ints[i] = new Integer(i); in testConstructor6()
113 for (int i = 0; i < SIZE; ++i) in testConstructor6()
114 assertEquals(ints[i], q.poll()); in testConstructor6()
[all …]
DLinkedListTest.java38 for (int i = 0; i < n; ++i) in populatedQueue()
39 assertTrue(q.offer(new Integer(i))); in populatedQueue()
67 for (int i = 0; i < SIZE; ++i) in testConstructor6()
68 ints[i] = i; in testConstructor6()
70 for (int i = 0; i < SIZE; ++i) in testConstructor6()
71 assertEquals(ints[i], q.poll()); in testConstructor6()
93 for (int i = 0; i < SIZE; ++i) { in testSize()
94 assertEquals(SIZE - i, q.size()); in testSize()
97 for (int i = 0; i < SIZE; ++i) { in testSize()
98 assertEquals(i, q.size()); in testSize()
[all …]
DPriorityBlockingQueueTest.java72 for (int i = n - 1; i >= 0; i -= 2) in populatedQueue()
73 assertTrue(q.offer(new Integer(i))); in populatedQueue()
74 for (int i = (n & 1); i < n; i += 2) in populatedQueue()
75 assertTrue(q.offer(new Integer(i))); in populatedQueue()
126 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5()
127 ints[i] = i; in testConstructor5()
140 for (int i = 0; i < SIZE; ++i) in testConstructor6()
141 ints[i] = i; in testConstructor6()
143 for (int i = 0; i < SIZE; ++i) in testConstructor6()
144 assertEquals(ints[i], q.poll()); in testConstructor6()
[all …]
DArrayDequeTest.java39 for (int i = 0; i < n; ++i) in populatedDeque()
40 assertTrue(q.offerLast(new Integer(i))); in populatedDeque()
78 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5()
79 ints[i] = new Integer(i); in testConstructor5()
91 for (int i = 0; i < SIZE; ++i) in testConstructor6()
92 ints[i] = new Integer(i); in testConstructor6()
94 for (int i = 0; i < SIZE; ++i) in testConstructor6()
95 assertEquals(ints[i], q.pollFirst()); in testConstructor6()
117 for (int i = 0; i < SIZE; ++i) { in testSize()
118 assertEquals(SIZE - i, q.size()); in testSize()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DAtomicIntegerArrayTest.java57 for (int i = 0; i < SIZE; i++) in testConstructor()
58 assertEquals(0, aa.get(i)); in testConstructor()
79 for (int i = 0; i < a.length; i++) in testConstructor2()
80 assertEquals(a[i], aa.get(i)); in testConstructor2()
125 for (int i = 0; i < SIZE; i++) { in testGetSet()
126 aa.set(i, 1); in testGetSet()
127 assertEquals(1, aa.get(i)); in testGetSet()
128 aa.set(i, 2); in testGetSet()
129 assertEquals(2, aa.get(i)); in testGetSet()
130 aa.set(i, -3); in testGetSet()
[all …]
DAtomicLongArrayTest.java56 for (int i = 0; i < SIZE; i++) in testConstructor()
57 assertEquals(0, aa.get(i)); in testConstructor()
78 for (int i = 0; i < a.length; i++) in testConstructor2()
79 assertEquals(a[i], aa.get(i)); in testConstructor2()
124 for (int i = 0; i < SIZE; i++) { in testGetSet()
125 aa.set(i, 1); in testGetSet()
126 assertEquals(1, aa.get(i)); in testGetSet()
127 aa.set(i, 2); in testGetSet()
128 assertEquals(2, aa.get(i)); in testGetSet()
129 aa.set(i, -3); in testGetSet()
[all …]
DLinkedListTest.java55 public Object makeElement(int i) { return i; } in suite() argument
77 for (int i = 0; i < n; ++i) in populatedQueue()
78 assertTrue(q.offer(new Integer(i))); in populatedQueue()
108 for (int i = 0; i < SIZE; ++i) in testConstructor6()
109 ints[i] = i; in testConstructor6()
111 for (int i = 0; i < SIZE; ++i) in testConstructor6()
112 assertEquals(ints[i], q.poll()); in testConstructor6()
134 for (int i = 0; i < SIZE; ++i) { in testSize()
135 assertEquals(SIZE - i, q.size()); in testSize()
138 for (int i = 0; i < SIZE; ++i) { in testSize()
[all …]
DPriorityQueueTest.java56 public Object makeElement(int i) { return i; } in suite() argument
77 for (int i = n - 1; i >= 0; i -= 2) in populatedQueue()
78 assertTrue(q.offer(new Integer(i))); in populatedQueue()
79 for (int i = (n & 1); i < n; i += 2) in populatedQueue()
80 assertTrue(q.offer(new Integer(i))); in populatedQueue()
129 for (int i = 0; i < SIZE - 1; ++i) in testConstructor5()
130 ints[i] = new Integer(i); in testConstructor5()
142 for (int i = 0; i < SIZE; ++i) in testConstructor6()
143 ints[i] = new Integer(i); in testConstructor6()
145 for (int i = 0; i < SIZE; ++i) in testConstructor6()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DCharacterBenchmark.java51 for (int i = 0; i < 65536; ++i) { in CharacterSet()
52 chars[i] = (char) (i % size); in CharacterSet()
61 for (int i = 0; i < reps; ++i) { in timeIsSpace()
67 for (int i = 0; i < reps; ++i) { in timeIsSpace()
78 for (int i = 0; i < reps; ++i) { in timeDigit()
84 for (int i = 0; i < reps; ++i) { in timeDigit()
94 for (int i = 0; i < reps; ++i) { in timeGetNumericValue()
100 for (int i = 0; i < reps; ++i) { in timeGetNumericValue()
110 for (int i = 0; i < reps; ++i) { in timeIsDigit()
116 for (int i = 0; i < reps; ++i) { in timeIsDigit()
[all …]
DAnnotatedElementBenchmark.java42 for (int i = 0; i < reps; i++) { in timeGetTypeAnnotations()
48 for (int i = 0; i < reps; i++) { in timeGetFieldAnnotations()
54 for (int i = 0; i < reps; i++) { in timeGetMethodAnnotations()
60 for (int i = 0; i < reps; i++) { in timeGetParameterAnnotations()
66 for (int i = 0; i < reps; i++) { in timeGetTypeAnnotation()
72 for (int i = 0; i < reps; i++) { in timeGetFieldAnnotation()
78 for (int i = 0; i < reps; i++) { in timeGetMethodAnnotation()
84 for (int i = 0; i < reps; i++) { in timeIsTypeAnnotationPresent()
90 for (int i = 0; i < reps; i++) { in timeIsFieldAnnotationPresent()
96 for (int i = 0; i < reps; i++) { in timeIsMethodAnnotationPresent()
[all …]
DIntegerBenchmark.java22 for (int i = 0; i < reps; ++i) { in timeLongSignumBranch()
23 t += signum1(-i); in timeLongSignumBranch()
25 t += signum1(i); in timeLongSignumBranch()
32 for (int i = 0; i < reps; ++i) { in timeLongSignumBranchFree()
33 t += signum2(-i); in timeLongSignumBranchFree()
35 t += signum2(i); in timeLongSignumBranchFree()
50 for (int i = 0; i < reps; ++i) { in timeLongBitCount_BitSet()
51 t += pop((long) i); in timeLongBitCount_BitSet()
76 for (int i = 0; i < reps; ++i) { in timeLongBitCount_2Int()
77 t += pop2((long) i); in timeLongBitCount_2Int()
[all …]
DExpensiveObjectsBenchmark.java33 for (int i = 0; i < reps; ++i) { in timeNewDateFormatTimeInstance()
41 for (int i = 0; i < reps; ++i) { in timeClonedDateFormatTimeInstance()
48 for (int i = 0; i < reps; ++i) { in timeReusedDateFormatTimeInstance()
56 for (int i = 0; i < reps; ++i) { in timeNewCollator()
63 for (int i = 0; i < reps; ++i) { in timeClonedCollator()
69 for (int i = 0; i < reps; ++i) { in timeNewDateFormatSymbols()
76 for (int i = 0; i < reps; ++i) { in timeClonedDateFormatSymbols()
82 for (int i = 0; i < reps; ++i) { in timeNewDecimalFormatSymbols()
89 for (int i = 0; i < reps; ++i) { in timeClonedDecimalFormatSymbols()
95 for (int i = 0; i < reps; ++i) { in timeNewNumberFormat()
[all …]
DIntConstantMultiplicationBenchmark.java22 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant6()
29 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant7()
36 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant8()
43 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant8_Shift()
50 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant10()
57 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant10_Shift()
64 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant2047()
71 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant2048()
78 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant2049()
86 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByVariable10()
[all …]
/libcore/ojluni/src/main/java/java/lang/
DInteger.java131 public static String toString(int i, int radix) { in toString() argument
137 return toString(i); in toString()
141 boolean negative = (i < 0); in toString()
145 i = -i; in toString()
148 while (i <= -radix) { in toString()
149 buf[charPos--] = digits[-(i % radix)]; in toString()
150 i = i / radix; in toString()
152 buf[charPos] = digits[-i]; in toString()
187 public static String toUnsignedString(int i, int radix) { in toUnsignedString() argument
188 return Long.toUnsignedString(toUnsignedLong(i), radix); in toUnsignedString()
[all …]
DLong.java121 public static String toString(long i, int radix) { in toString() argument
125 return toString(i); in toString()
128 boolean negative = (i < 0); in toString()
131 i = -i; in toString()
134 while (i <= -radix) { in toString()
135 buf[charPos--] = Integer.digits[(int)(-(i % radix))]; in toString()
136 i = i / radix; in toString()
138 buf[charPos] = Integer.digits[(int)(-i)]; in toString()
173 public static String toUnsignedString(long i, int radix) { in toUnsignedString() argument
174 if (i >= 0) in toUnsignedString()
[all …]
/libcore/luni/src/test/java/libcore/dalvik/system/
DJniTest.java98 for(int i = 0; i < 16; i++) { in testPassingObjectReferences()
99 a[i] = literal; in testPassingObjectReferences()
101 for(int i = 0; i < 16; i++) { in testPassingObjectReferences()
102 assertEquals(a[i], returnObjectArgFrom16(i, a[0], a[1], a[2], a[3], a[4], in testPassingObjectReferences()
109 for(int i = 0; i < 16; i++) { in testPassingObjectReferences()
110 a[i] = literals[(i + j) % literals.length]; in testPassingObjectReferences()
112 for(int i = 0; i < 16; i++) { in testPassingObjectReferences()
113 assertEquals(a[i], returnObjectArgFrom16(i, a[0], a[1], a[2], a[3], a[4], in testPassingObjectReferences()
126 for(int i = 0; i < 16; i++) { in testPassingBooleans()
127 a[i] = literal; in testPassingBooleans()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DBitSetTest.java92 for (int i = 0; i < 8; i++) { in test_clear()
93 assertTrue("Clear didn't clear bit " + i, !eightbs.get(i)); in test_clear()
112 for (int i = 0; i < 7; i++) { in test_clearI()
113 assertTrue("Clear cleared incorrect bits", eightbs.get(i)); in test_clearI()
165 for (int i = 0; i < 20; i++) { in test_clearII()
166 bitset.set(i); in test_clearII()
178 for (int i = 0; i < 7; i++) { in test_clearII()
179 if (i == 5) { in test_clearII()
180 assertFalse("Shouldn't have flipped bit " + i, bs.get(i)); in test_clearII()
182 assertTrue("Shouldn't have cleared bit " + i, bs.get(i)); in test_clearII()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerConstructorsTest.java56 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive1()
57 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesPositive1()
72 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive2()
73 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesPositive2()
88 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive3()
89 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesPositive3()
104 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive()
105 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesPositive()
120 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesNegative1()
121 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesNegative1()
[all …]
DBigIntegerOperateBitsTest.java151 for(int i = 0; i < resBytes.length; i++) { in testClearBitZero()
152 assertTrue(resBytes[i] == rBytes[i]); in testClearBitZero()
169 for(int i = 0; i < resBytes.length; i++) { in testClearBitZeroOutside1()
170 assertTrue(resBytes[i] == rBytes[i]); in testClearBitZeroOutside1()
187 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeInside1()
188 assertTrue(resBytes[i] == rBytes[i]); in testClearBitNegativeInside1()
205 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeInside2()
206 assertTrue(resBytes[i] == rBytes[i]); in testClearBitNegativeInside2()
262 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeOutside1()
263 assertTrue(resBytes[i] == rBytes[i]); in testClearBitNegativeOutside1()
[all …]

12345678910>>...54