Home
last modified time | relevance | path

Searched refs:a (Results 1 – 25 of 329) sorted by relevance

12345678910>>...14

/libcore/luni/src/test/java/dalvik/system/
DJniTest.java95 final Object[] a = new Object[16]; in testPassingObjectReferences() local
99 a[i] = literal; in testPassingObjectReferences()
102 assertEquals(a[i], returnObjectArgFrom16(i, a[0], a[1], a[2], a[3], a[4], in testPassingObjectReferences()
103 a[5], a[6], a[7], a[8], a[9], a[10], in testPassingObjectReferences()
104 a[11], a[12], a[13], a[14], a[15])); in testPassingObjectReferences()
110 a[i] = literals[(i + j) % literals.length]; in testPassingObjectReferences()
113 assertEquals(a[i], returnObjectArgFrom16(i, a[0], a[1], a[2], a[3], a[4], in testPassingObjectReferences()
114 a[5], a[6], a[7], a[8], a[9], a[10], in testPassingObjectReferences()
115 a[11], a[12], a[13], a[14], a[15])); in testPassingObjectReferences()
123 final boolean[] a = new boolean[16]; in testPassingBooleans()
[all …]
/libcore/ojluni/src/main/native/
Djlong_md.h33 #define jlong_high(a) ((jint)((a)>>32)) argument
34 #define jlong_low(a) ((jint)(a)) argument
35 #define jlong_add(a, b) ((a) + (b)) argument
36 #define jlong_and(a, b) ((a) & (b)) argument
37 #define jlong_div(a, b) ((a) / (b)) argument
38 #define jlong_mul(a, b) ((a) * (b)) argument
39 #define jlong_neg(a) (-(a)) argument
40 #define jlong_not(a) (~(a)) argument
41 #define jlong_or(a, b) ((a) | (b)) argument
42 #define jlong_shl(a, n) ((a) << (n)) argument
[all …]
/libcore/ojluni/src/main/java/java/util/
DDualPivotQuicksort.java107 static void sort(int[] a, int left, int right, in sort() argument
111 sort(a, left, right, true); in sort()
124 if (a[k] < a[k + 1]) { // ascending in sort()
125 while (++k <= right && a[k - 1] <= a[k]); in sort()
126 } else if (a[k] > a[k + 1]) { // descending in sort()
127 while (++k <= right && a[k - 1] >= a[k]); in sort()
129 int t = a[lo]; a[lo] = a[hi]; a[hi] = t; in sort()
132 for (int m = MAX_RUN_LENGTH; ++k <= right && a[k - 1] == a[k]; ) { in sort()
134 sort(a, left, right, true); in sort()
145 sort(a, left, right, true); in sort()
[all …]
DArrays.java125 public static void sort(int[] a) { in sort() argument
126 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort()
149 public static void sort(int[] a, int fromIndex, int toIndex) { in sort() argument
150 rangeCheck(a.length, fromIndex, toIndex); in sort()
151 DualPivotQuicksort.sort(a, fromIndex, toIndex - 1, null, 0, 0); in sort()
165 public static void sort(long[] a) { in sort() argument
166 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort()
189 public static void sort(long[] a, int fromIndex, int toIndex) { in sort() argument
190 rangeCheck(a.length, fromIndex, toIndex); in sort()
191 DualPivotQuicksort.sort(a, fromIndex, toIndex - 1, null, 0, 0); in sort()
[all …]
DComparableTimSort.java65 private final Object[] a; field in ComparableTimSort
120 private ComparableTimSort(Object[] a, Object[] work, int workBase, int workLen) { in ComparableTimSort() argument
121 this.a = a; in ComparableTimSort()
124 int len = a.length; in ComparableTimSort()
175 static void sort(Object[] a, int lo, int hi, Object[] work, int workBase, int workLen) { in sort() argument
176 assert a != null && lo >= 0 && lo <= hi && hi <= a.length; in sort()
184 int initRunLen = countRunAndMakeAscending(a, lo, hi); in sort()
185 binarySort(a, lo, hi, lo + initRunLen); in sort()
194 ComparableTimSort ts = new ComparableTimSort(a, work, workBase, workLen); in sort()
198 int runLen = countRunAndMakeAscending(a, lo, hi); in sort()
[all …]
DTimSort.java85 private final T[] a; field in TimSort
146 private TimSort(T[] a, Comparator<? super T> c, T[] work, int workBase, int workLen) { in TimSort() argument
147 this.a = a; in TimSort()
151 int len = a.length; in TimSort()
157 (a.getClass().getComponentType(), tlen); in TimSort()
206 static <T> void sort(T[] a, int lo, int hi, Comparator<? super T> c, in sort() argument
208 assert c != null && a != null && lo >= 0 && lo <= hi && hi <= a.length; in sort()
216 int initRunLen = countRunAndMakeAscending(a, lo, hi, c); in sort()
217 binarySort(a, lo, hi, lo + initRunLen, c); in sort()
226 TimSort<T> ts = new TimSort<>(a, c, work, workBase, workLen); in sort()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicIntegerFieldUpdaterTest.java145 AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> a; in testGetSet() local
146 a = updaterFor("x"); in testGetSet()
148 assertEquals(1, a.get(this)); in testGetSet()
149 a.set(this, 2); in testGetSet()
150 assertEquals(2, a.get(this)); in testGetSet()
151 a.set(this, -3); in testGetSet()
152 assertEquals(-3, a.get(this)); in testGetSet()
159 AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> a; in testGetLazySet() local
160 a = updaterFor("x"); in testGetLazySet()
162 assertEquals(1, a.get(this)); in testGetLazySet()
[all …]
DAtomicLongFieldUpdaterTest.java145 AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a; in testGetSet() local
146 a = updaterFor("x"); in testGetSet()
148 assertEquals(1, a.get(this)); in testGetSet()
149 a.set(this, 2); in testGetSet()
150 assertEquals(2, a.get(this)); in testGetSet()
151 a.set(this, -3); in testGetSet()
152 assertEquals(-3, a.get(this)); in testGetSet()
159 AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a; in testGetLazySet() local
160 a = updaterFor("x"); in testGetLazySet()
162 assertEquals(1, a.get(this)); in testGetLazySet()
[all …]
DAtomic8Test.java73 AtomicLong a = new AtomicLong(1L); in testLongGetAndUpdate() local
74 assertEquals(1L, a.getAndUpdate(Atomic8Test::addLong17)); in testLongGetAndUpdate()
75 assertEquals(18L, a.getAndUpdate(Atomic8Test::addLong17)); in testLongGetAndUpdate()
76 assertEquals(35L, a.get()); in testLongGetAndUpdate()
84 AtomicLong a = new AtomicLong(1L); in testLongUpdateAndGet() local
85 assertEquals(18L, a.updateAndGet(Atomic8Test::addLong17)); in testLongUpdateAndGet()
86 assertEquals(35L, a.updateAndGet(Atomic8Test::addLong17)); in testLongUpdateAndGet()
94 AtomicLong a = new AtomicLong(1L); in testLongGetAndAccumulate() local
95 assertEquals(1L, a.getAndAccumulate(2L, Long::sum)); in testLongGetAndAccumulate()
96 assertEquals(3L, a.getAndAccumulate(3L, Long::sum)); in testLongGetAndAccumulate()
[all …]
DAtomicReferenceFieldUpdaterTest.java157 AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest, Integer> a; in testGetSet() local
158 a = updaterFor("x"); in testGetSet()
160 assertSame(one, a.get(this)); in testGetSet()
161 a.set(this, two); in testGetSet()
162 assertSame(two, a.get(this)); in testGetSet()
163 a.set(this, m3); in testGetSet()
164 assertSame(m3, a.get(this)); in testGetSet()
171 AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest, Integer> a; in testGetLazySet() local
172 a = updaterFor("x"); in testGetLazySet()
174 assertSame(one, a.get(this)); in testGetLazySet()
[all …]
DCountedCompleterTest.java55 private void testInvokeOnPool(ForkJoinPool pool, ForkJoinTask a) { in testInvokeOnPool() argument
57 assertFalse(a.isDone()); in testInvokeOnPool()
58 assertFalse(a.isCompletedNormally()); in testInvokeOnPool()
59 assertFalse(a.isCompletedAbnormally()); in testInvokeOnPool()
60 assertFalse(a.isCancelled()); in testInvokeOnPool()
61 assertNull(a.getException()); in testInvokeOnPool()
62 assertNull(a.getRawResult()); in testInvokeOnPool()
64 assertNull(pool.invoke(a)); in testInvokeOnPool()
66 assertTrue(a.isDone()); in testInvokeOnPool()
67 assertTrue(a.isCompletedNormally()); in testInvokeOnPool()
[all …]
DForkJoinTaskTest.java57 private void testInvokeOnPool(ForkJoinPool pool, RecursiveAction a) { in testInvokeOnPool() argument
59 assertFalse(a.isDone()); in testInvokeOnPool()
60 assertFalse(a.isCompletedNormally()); in testInvokeOnPool()
61 assertFalse(a.isCompletedAbnormally()); in testInvokeOnPool()
62 assertFalse(a.isCancelled()); in testInvokeOnPool()
63 assertNull(a.getException()); in testInvokeOnPool()
64 assertNull(a.getRawResult()); in testInvokeOnPool()
66 assertNull(pool.invoke(a)); in testInvokeOnPool()
68 assertTrue(a.isDone()); in testInvokeOnPool()
69 assertTrue(a.isCompletedNormally()); in testInvokeOnPool()
[all …]
DCopyOnWriteArraySetTest.java35 CopyOnWriteArraySet<Integer> a = new CopyOnWriteArraySet<Integer>(); in populatedSet() local
36 assertTrue(a.isEmpty()); in populatedSet()
38 a.add(i); in populatedSet()
39 assertEquals(n == 0, a.isEmpty()); in populatedSet()
40 assertEquals(n, a.size()); in populatedSet()
41 return a; in populatedSet()
45 CopyOnWriteArraySet<Integer> a = new CopyOnWriteArraySet<Integer>(); in populatedSet() local
46 assertTrue(a.isEmpty()); in populatedSet()
48 a.add(elements[i]); in populatedSet()
49 assertFalse(a.isEmpty()); in populatedSet()
[all …]
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java95 public static native double sin(double a); in sin() argument
105 public static native double cos(double a); in cos() argument
117 public static native double tan(double a); in tan() argument
130 public static native double asin(double a); in asin() argument
141 public static native double acos(double a); in acos() argument
153 public static native double atan(double a); in atan() argument
196 public static native double exp(double a); in exp() argument
212 public static native double log(double a); in log() argument
233 public static native double log10(double a); in log10() argument
251 public static native double sqrt(double a); in sqrt() argument
[all …]
DMath.java122 public static native double sin(double a); in sin() argument
135 public static native double cos(double a); in cos() argument
150 public static native double tan(double a); in tan() argument
166 public static native double asin(double a); in asin() argument
180 public static native double acos(double a); in acos() argument
195 public static native double atan(double a); in atan() argument
243 public static native double exp(double a); in exp() argument
262 public static native double log(double a); in log() argument
285 public static native double log10(double a); in log10() argument
304 public static native double sqrt(double a); in sqrt() argument
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DMathTest.java37 private void testIntExact(int a, int b) { in testIntExact() argument
38 testAddExactI(a, b); in testIntExact()
39 testSubtractExactI(a, b); in testIntExact()
40 testMultiplyExactI(a, b); in testIntExact()
41 testIncrementExactI(a); in testIntExact()
42 testDecrementExactI(a); in testIntExact()
43 testNegateExactI(a); in testIntExact()
46 private void testAddExactI(int a, int b) { in testAddExactI() argument
47 long expected = (long) a + (long) b; in testAddExactI()
49 assertEquals(expected, Math.addExact(a, b)); in testAddExactI()
[all …]
DStrictMathTest.java37 private void testIntExact(int a, int b) { in testIntExact() argument
38 testAddExactI(a, b); in testIntExact()
39 testSubtractExactI(a, b); in testIntExact()
40 testMultiplyExactI(a, b); in testIntExact()
43 private void testAddExactI(int a, int b) { in testAddExactI() argument
44 long expected = (long) a + (long) b; in testAddExactI()
46 assertEquals(expected, StrictMath.addExact(a, b)); in testAddExactI()
48 if (expected == a + b) { in testAddExactI()
54 private void testSubtractExactI(int a, int b) { in testSubtractExactI() argument
55 long expected = (long) a - (long) b; in testSubtractExactI()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigDecimalConvertTest.java37 String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; in testDoubleValueNeg() local
38 BigDecimal aNumber = new BigDecimal(a); in testDoubleValueNeg()
47 String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; in testDoubleValuePos() local
48 BigDecimal aNumber = new BigDecimal(a); in testDoubleValuePos()
57 String a = "123809648392384754573567356745735.63567890295784902768787678287E+400"; in testDoubleValuePosInfinity() local
58 BigDecimal aNumber = new BigDecimal(a); in testDoubleValuePosInfinity()
67 String a = "-123809648392384754573567356745735.63567890295784902768787678287E+400"; in testDoubleValueNegInfinity() local
68 BigDecimal aNumber = new BigDecimal(a); in testDoubleValueNegInfinity()
77 String a = "-123809648392384754573567356745735.63567890295784902768787678287E-400"; in testDoubleValueMinusZero() local
78 BigDecimal aNumber = new BigDecimal(a); in testDoubleValueMinusZero()
[all …]
DBigIntegerConvertTest.java36 String a = "0"; in testDoubleValueZero() local
38 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValueZero()
47 String a = "27467238945"; in testDoubleValuePositive1() local
49 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValuePositive1()
58 String a = "2746723894572364578265426346273456972"; in testDoubleValuePositive2() local
60 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValuePositive2()
69 String a = "-27467238945"; in testDoubleValueNegative1() local
71 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValueNegative1()
80 String a = "-2746723894572364578265426346273456972"; in testDoubleValueNegative2() local
82 double aNumber = new BigInteger(a).doubleValue(); in testDoubleValueNegative2()
[all …]
DBigDecimalScaleOperationsTest.java35 String a = "1231212478987482988429808779810457634781384756794987"; in testScaleDefault() local
37 BigDecimal aNumber = new BigDecimal(new BigInteger(a)); in testScaleDefault()
45 String a = "1231212478987482988429808779810457634781384756794987"; in testScaleNeg() local
48 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); in testScaleNeg()
56 String a = "1231212478987482988429808779810457634781384756794987"; in testScalePos() local
59 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); in testScalePos()
67 String a = "1231212478987482988429808779810457634781384756794987"; in testScaleZero() local
70 BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); in testScaleZero()
78 String a = "1231212478987482988429808779810457634781384756794987"; in testUnscaledValue() local
80 BigInteger bNumber = new BigInteger(a); in testUnscaledValue()
[all …]
/libcore/luni/src/main/java/java/math/
DNativeBN.java24 public static native void BN_free(long a); in BN_free() argument
27 public static native int BN_cmp(long a, long b); in BN_cmp() argument
33 public static native void putLongInt(long a, long dw); in putLongInt() argument
34 public static native void putULongInt(long a, long dw, boolean neg); in putULongInt() argument
36 public static native int BN_dec2bn(long a, String str); in BN_dec2bn() argument
39 public static native int BN_hex2bn(long a, String str); in BN_hex2bn() argument
52 public static native long longInt(long a); in longInt() argument
55 public static native String BN_bn2dec(long a); in BN_bn2dec() argument
58 public static native String BN_bn2hex(long a); in BN_bn2hex() argument
61 public static native byte[] BN_bn2bin(long a); in BN_bn2bin() argument
[all …]
/libcore/ojluni/src/main/java/java/net/
DAuthenticator.java122 public synchronized static void setDefault(Authenticator a) { in setDefault() argument
130 theAuthenticator = a; in setDefault()
174 Authenticator a = theAuthenticator; in requestPasswordAuthentication() local
175 if (a == null) { in requestPasswordAuthentication()
178 synchronized(a) { in requestPasswordAuthentication()
179 a.reset(); in requestPasswordAuthentication()
180 a.requestingSite = addr; in requestPasswordAuthentication()
181 a.requestingPort = port; in requestPasswordAuthentication()
182 a.requestingProtocol = protocol; in requestPasswordAuthentication()
183 a.requestingPrompt = prompt; in requestPasswordAuthentication()
[all …]
/libcore/ojluni/src/main/java/java/nio/
DBits.java74 static char getCharL(long a) { in getCharL() argument
75 return makeChar(_get(a + 1), in getCharL()
76 _get(a)); in getCharL()
84 static char getCharB(long a) { in getCharB() argument
85 return makeChar(_get(a), in getCharB()
86 _get(a + 1)); in getCharB()
93 static char getChar(long a, boolean bigEndian) { in getChar() argument
94 return bigEndian ? getCharB(a) : getCharL(a); in getChar()
110 static void putCharL(long a, char x) { in putCharL() argument
111 _put(a, char0(x)); in putCharL()
[all …]
/libcore/luni/src/test/java/libcore/java/math/
DOldBigDecimalArithmeticTest.java30 BigDecimal a, b, res; in testAddMathContextNonTrivial() local
33 a = new BigDecimal("123456789012345.678"); in testAddMathContextNonTrivial()
36 a.round(mc).toString()); in testAddMathContextNonTrivial()
40 a.round(mc).add(b.round(mc)).toString()); in testAddMathContextNonTrivial()
41 res = a.add(b, mc); in testAddMathContextNonTrivial()
45 a = new BigDecimal("1234567890123456789012345678.9012395"); in testAddMathContextNonTrivial()
47 res = a.add(b, mc); in testAddMathContextNonTrivial()
55 BigDecimal a, b, res; in testSubtractMathContextNonTrivial() local
58 a = new BigDecimal("12345678901234567.8"); in testSubtractMathContextNonTrivial()
61 a.round(mc).subtract(b.round(mc)).toString()); in testSubtractMathContextNonTrivial()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
DAttributesTest.java30 private Attributes a; field in AttributesTest
34 a = new Attributes(); in setUp()
35 a.putValue("1", "one"); in setUp()
36 a.putValue("2", "two"); in setUp()
37 a.putValue("3", "three"); in setUp()
38 a.putValue("4", "four"); in setUp()
45 Attributes a2 = new Attributes(a); in test_ConstructorLjava_util_jar_Attributes()
46 assertEquals(a, a2); in test_ConstructorLjava_util_jar_Attributes()
47 a.putValue("1", "one(1)"); in test_ConstructorLjava_util_jar_Attributes()
48 assertTrue("equal", !a.equals(a2)); in test_ConstructorLjava_util_jar_Attributes()
[all …]

12345678910>>...14