Home
last modified time | relevance | path

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

12345678910>>...19

/libcore/luni/src/test/java/libcore/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/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.java146 public static void sort(int[] a) { in sort() argument
147 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort()
170 public static void sort(int[] a, int fromIndex, int toIndex) { in sort() argument
171 rangeCheck(a.length, fromIndex, toIndex); in sort()
172 DualPivotQuicksort.sort(a, fromIndex, toIndex - 1, null, 0, 0); in sort()
186 public static void sort(long[] a) { in sort() argument
187 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort()
210 public static void sort(long[] a, int fromIndex, int toIndex) { in sort() argument
211 rangeCheck(a.length, fromIndex, toIndex); in sort()
212 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()
179 static void sort(Object[] a, int lo, int hi, Object[] work, int workBase, int workLen) { in sort() argument
180 assert a != null && lo >= 0 && lo <= hi && hi <= a.length; in sort()
188 int initRunLen = countRunAndMakeAscending(a, lo, hi); in sort()
189 binarySort(a, lo, hi, lo + initRunLen); in sort()
198 ComparableTimSort ts = new ComparableTimSort(a, work, workBase, workLen); in sort()
202 int runLen = countRunAndMakeAscending(a, lo, hi); in sort()
[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/jsr166-tests/src/test/java/jsr166/
DAtomicLongFieldUpdaterTest.java36 AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a = in checkPrivateAccess() local
46 AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a = in checkCompareAndSetProtectedSub() local
50 assertTrue(a.compareAndSet(this, 1, 2)); in checkCompareAndSetProtectedSub()
51 assertTrue(a.compareAndSet(this, 2, -4)); in checkCompareAndSetProtectedSub()
52 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
53 assertFalse(a.compareAndSet(this, -5, 7)); in checkCompareAndSetProtectedSub()
54 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
55 assertTrue(a.compareAndSet(this, -4, 7)); in checkCompareAndSetProtectedSub()
56 assertEquals(7, a.get(this)); in checkCompareAndSetProtectedSub()
63 AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a = in checkPackageAccess() local
[all …]
DAtomicIntegerFieldUpdaterTest.java36 AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> a = in checkPrivateAccess() local
46 AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> a = in checkCompareAndSetProtectedSub() local
50 assertTrue(a.compareAndSet(this, 1, 2)); in checkCompareAndSetProtectedSub()
51 assertTrue(a.compareAndSet(this, 2, -4)); in checkCompareAndSetProtectedSub()
52 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
53 assertFalse(a.compareAndSet(this, -5, 7)); in checkCompareAndSetProtectedSub()
54 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
55 assertTrue(a.compareAndSet(this, -4, 7)); in checkCompareAndSetProtectedSub()
56 assertEquals(7, a.get(this)); in checkCompareAndSetProtectedSub()
63 AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> a = in checkPackageAccess() local
[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.java38 AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest,Integer> a = in checkPrivateAccess() local
48 AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest,Integer> a = in checkCompareAndSetProtectedSub() local
52 assertTrue(a.compareAndSet(this, one, two)); in checkCompareAndSetProtectedSub()
53 assertTrue(a.compareAndSet(this, two, m4)); in checkCompareAndSetProtectedSub()
54 assertSame(m4, a.get(this)); in checkCompareAndSetProtectedSub()
55 assertFalse(a.compareAndSet(this, m5, seven)); in checkCompareAndSetProtectedSub()
56 assertFalse(seven == a.get(this)); in checkCompareAndSetProtectedSub()
57 assertTrue(a.compareAndSet(this, m4, seven)); in checkCompareAndSetProtectedSub()
58 assertSame(seven, a.get(this)); in checkCompareAndSetProtectedSub()
65 AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest,Integer> a = in checkPackageAccess() local
[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 …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DAtomicLongFieldUpdaterTest.java59 AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a = in checkPrivateAccess() local
69 AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a = in checkCompareAndSetProtectedSub() local
73 assertTrue(a.compareAndSet(this, 1, 2)); in checkCompareAndSetProtectedSub()
74 assertTrue(a.compareAndSet(this, 2, -4)); in checkCompareAndSetProtectedSub()
75 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
76 assertFalse(a.compareAndSet(this, -5, 7)); in checkCompareAndSetProtectedSub()
77 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
78 assertTrue(a.compareAndSet(this, -4, 7)); in checkCompareAndSetProtectedSub()
79 assertEquals(7, a.get(this)); in checkCompareAndSetProtectedSub()
86 AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a = in checkPackageAccess() local
[all …]
DAtomicIntegerFieldUpdaterTest.java59 AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> a = in checkPrivateAccess() local
69 AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> a = in checkCompareAndSetProtectedSub() local
73 assertTrue(a.compareAndSet(this, 1, 2)); in checkCompareAndSetProtectedSub()
74 assertTrue(a.compareAndSet(this, 2, -4)); in checkCompareAndSetProtectedSub()
75 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
76 assertFalse(a.compareAndSet(this, -5, 7)); in checkCompareAndSetProtectedSub()
77 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
78 assertTrue(a.compareAndSet(this, -4, 7)); in checkCompareAndSetProtectedSub()
79 assertEquals(7, a.get(this)); in checkCompareAndSetProtectedSub()
86 AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> a = in checkPackageAccess() local
[all …]
DAtomic8Test.java94 AtomicLong a = new AtomicLong(1L); in testLongGetAndUpdate() local
95 assertEquals(1L, a.getAndUpdate(Atomic8Test::addLong17)); in testLongGetAndUpdate()
96 assertEquals(18L, a.getAndUpdate(Atomic8Test::addLong17)); in testLongGetAndUpdate()
97 assertEquals(35L, a.get()); in testLongGetAndUpdate()
105 AtomicLong a = new AtomicLong(1L); in testLongUpdateAndGet() local
106 assertEquals(18L, a.updateAndGet(Atomic8Test::addLong17)); in testLongUpdateAndGet()
107 assertEquals(35L, a.updateAndGet(Atomic8Test::addLong17)); in testLongUpdateAndGet()
115 AtomicLong a = new AtomicLong(1L); in testLongGetAndAccumulate() local
116 assertEquals(1L, a.getAndAccumulate(2L, Long::sum)); in testLongGetAndAccumulate()
117 assertEquals(3L, a.getAndAccumulate(3L, Long::sum)); in testLongGetAndAccumulate()
[all …]
DAtomicReferenceFieldUpdaterTest.java61 AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest,Integer> a = in checkPrivateAccess() local
71 AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest,Integer> a = in checkCompareAndSetProtectedSub() local
75 assertTrue(a.compareAndSet(this, one, two)); in checkCompareAndSetProtectedSub()
76 assertTrue(a.compareAndSet(this, two, m4)); in checkCompareAndSetProtectedSub()
77 assertSame(m4, a.get(this)); in checkCompareAndSetProtectedSub()
78 assertFalse(a.compareAndSet(this, m5, seven)); in checkCompareAndSetProtectedSub()
79 assertFalse(seven == a.get(this)); in checkCompareAndSetProtectedSub()
80 assertTrue(a.compareAndSet(this, m4, seven)); in checkCompareAndSetProtectedSub()
81 assertSame(seven, a.get(this)); in checkCompareAndSetProtectedSub()
88 AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest,Integer> a = in checkPackageAccess() local
[all …]
DCountedCompleterTest.java80 private void testInvokeOnPool(ForkJoinPool pool, ForkJoinTask a) { in testInvokeOnPool() argument
82 assertFalse(a.isDone()); in testInvokeOnPool()
83 assertFalse(a.isCompletedNormally()); in testInvokeOnPool()
84 assertFalse(a.isCompletedAbnormally()); in testInvokeOnPool()
85 assertFalse(a.isCancelled()); in testInvokeOnPool()
86 assertNull(a.getException()); in testInvokeOnPool()
87 assertNull(a.getRawResult()); in testInvokeOnPool()
89 assertNull(pool.invoke(a)); in testInvokeOnPool()
91 assertTrue(a.isDone()); in testInvokeOnPool()
92 assertTrue(a.isCompletedNormally()); in testInvokeOnPool()
[all …]
DForkJoinTaskTest.java79 private void testInvokeOnPool(ForkJoinPool pool, RecursiveAction a) { in testInvokeOnPool() argument
81 assertFalse(a.isDone()); in testInvokeOnPool()
82 assertFalse(a.isCompletedNormally()); in testInvokeOnPool()
83 assertFalse(a.isCompletedAbnormally()); in testInvokeOnPool()
84 assertFalse(a.isCancelled()); in testInvokeOnPool()
85 assertNull(a.getException()); in testInvokeOnPool()
86 assertNull(a.getRawResult()); in testInvokeOnPool()
88 assertNull(pool.invoke(a)); in testInvokeOnPool()
90 assertTrue(a.isDone()); in testInvokeOnPool()
91 assertTrue(a.isCompletedNormally()); in testInvokeOnPool()
[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/ojluni/src/main/java/java/nio/
DBits.java73 static char getCharL(long a) { in getCharL() argument
74 return makeChar(_get(a + 1), in getCharL()
75 _get(a )); in getCharL()
83 static char getCharB(long a) { in getCharB() argument
84 return makeChar(_get(a ), in getCharB()
85 _get(a + 1)); in getCharB()
92 static char getChar(long a, boolean bigEndian) { in getChar() argument
93 return bigEndian ? getCharB(a) : getCharL(a); in getChar()
104 static void putCharL(long a, char x) { in putCharL() argument
105 _put(a , char0(x)); in putCharL()
[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 …]
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java124 public static native double sin(double a); in sin() argument
134 public static native double cos(double a); in cos() argument
146 public static native double tan(double a); in tan() argument
159 public static native double asin(double a); in asin() argument
170 public static native double acos(double a); in acos() argument
182 public static native double atan(double a); in atan() argument
229 public static native double exp(double a); in exp() argument
245 public static native double log(double a); in log() argument
266 public static native double log10(double a); in log10() argument
284 public static native double sqrt(double a); in sqrt() argument
[all …]
DMath.java161 public static native double sin(double a); in sin() argument
175 public static native double cos(double a); in cos() argument
191 public static native double tan(double a); in tan() argument
208 public static native double asin(double a); in asin() argument
223 public static native double acos(double a); in acos() argument
239 public static native double atan(double a); in atan() argument
288 public static native double exp(double a); in exp() argument
308 public static native double log(double a); in log() argument
332 public static native double log10(double a); in log10() argument
352 public static native double sqrt(double a); in sqrt() 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/annotations/hiddenapi/java/util/
DArrays.java42 public static void sort(int[] a) { in sort() argument
46 public static void sort(int[] a, int fromIndex, int toIndex) { in sort() argument
50 public static void sort(long[] a) { in sort() argument
54 public static void sort(long[] a, int fromIndex, int toIndex) { in sort() argument
58 public static void sort(short[] a) { in sort() argument
62 public static void sort(short[] a, int fromIndex, int toIndex) { in sort() argument
66 public static void sort(char[] a) { in sort() argument
70 public static void sort(char[] a, int fromIndex, int toIndex) { in sort() argument
74 public static void sort(byte[] a) { in sort() argument
78 public static void sort(byte[] a, int fromIndex, int toIndex) { in sort() argument
[all …]

12345678910>>...19