/libcore/luni/src/test/java/libcore/dalvik/system/ |
D | JniTest.java | 95 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/ |
D | jlong_md.h | 33 #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/test/java/util/Arrays/ |
D | SortingHelper.java | 48 public void sort(Object a) { in sort() argument 71 if (a instanceof int[]) { in sort() 73 (int[]) a, SEQUENTIAL, 0, ((int[]) a).length); in sort() 74 } else if (a instanceof long[]) { in sort() 76 (long[]) a, SEQUENTIAL, 0, ((long[]) a).length); in sort() 77 } else if (a instanceof byte[]) { in sort() 79 (byte[]) a, 0, ((byte[]) a).length); in sort() 80 } else if (a instanceof char[]) { in sort() 82 (char[]) a, SEQUENTIAL, 0, ((char[]) a).length); in sort() 83 } else if (a instanceof short[]) { in sort() [all …]
|
D | Sorting.java | 171 Pair[] a = build(length, random); in testStability() local 172 sortingHelper.sort(a); in testStability() 173 checkSorted(a); in testStability() 174 checkStable(a); in testStability() 176 a = build(length, random); in testStability() 177 sortingHelper.sort(a, pairComparator); in testStability() 178 checkSorted(a); in testStability() 179 checkStable(a); in testStability() 350 private void checkSorted(Pair[] a) { in checkSorted() argument 351 for (int i = 0; i < a.length - 1; i++) { in checkSorted() [all …]
|
D | ArrayObjectMethods.java | 49 Object[] a = {1, null}; in test() local 50 a[1] = a; in test() 51 equal(Arrays.deepToString(a), "[1, [...]]"); in test() 52 a[0] = a; in test() 53 equal(Arrays.deepToString(a), "[[...], [...]]"); in test() 54 a[0] = a[1] = new Object[]{1, null, a}; in test() 55 equal(Arrays.deepToString(a), "[[1, null, [...]], [1, null, [...]]]"); in test() 60 long[] a = Rnd.longArray(size); in test() local 61 equal(Arrays.toString(a), PrimitiveArrays.asList(a).toString()); in test() 62 equal(Arrays.hashCode(a), PrimitiveArrays.asList(a).hashCode()); in test() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | DualPivotQuicksort.java | 155 static void sort(int[] a, int parallelism, int low, int high) { in sort() argument 161 new Sorter(null, a, b, low, size, low, depth).invoke(); in sort() 163 sort(null, a, 0, low, high); in sort() 178 static void sort(Sorter sorter, int[] a, int bits, int low, int high) { in sort() argument 186 mixedInsertionSort(a, low, high - 3 * ((size >> 5) << 3), high); in sort() 194 insertionSort(a, low, high); in sort() 203 && tryMergeRuns(sorter, a, low, size)) { in sort() 212 heapSort(a, low, high); in sort() 233 int a3 = a[e3]; in sort() 247 if (a[e5] < a[e2]) { int t = a[e5]; a[e5] = a[e2]; a[e2] = t; } in sort() [all …]
|
D | Arrays.java | 106 public static void sort(int[] a) { in sort() argument 107 DualPivotQuicksort.sort(a, 0, 0, a.length); in sort() 129 public static void sort(int[] a, int fromIndex, int toIndex) { in sort() argument 130 rangeCheck(a.length, fromIndex, toIndex); in sort() 131 DualPivotQuicksort.sort(a, 0, fromIndex, toIndex); in sort() 144 public static void sort(long[] a) { in sort() argument 145 DualPivotQuicksort.sort(a, 0, 0, a.length); in sort() 167 public static void sort(long[] a, int fromIndex, int toIndex) { in sort() argument 168 rangeCheck(a.length, fromIndex, toIndex); in sort() 169 DualPivotQuicksort.sort(a, 0, fromIndex, toIndex); in sort() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | AtomicIntegerFieldUpdaterTest.java | 36 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 …]
|
D | AtomicLongFieldUpdaterTest.java | 36 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 …]
|
D | Atomic8Test.java | 73 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 …]
|
D | AtomicReferenceFieldUpdaterTest.java | 38 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 …]
|
D | CountedCompleterTest.java | 55 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 …]
|
D | ForkJoinTaskTest.java | 57 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/ |
D | AtomicIntegerFieldUpdaterTest.java | 59 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 …]
|
D | AtomicLongFieldUpdaterTest.java | 59 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 …]
|
D | Atomic8Test.java | 94 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 …]
|
D | AtomicReferenceFieldUpdaterTest.java | 61 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 …]
|
D | CountedCompleterTest.java | 80 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 …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | MathTest.java | 37 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 …]
|
D | StrictMathTest.java | 37 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/test/java/util/regex/ |
D | TestCases.txt | 12 // version 2 for more details (a copy is included in the LICENSE file that 15 // You should have received a copy of the GNU General Public License version 26 // The first line is a pattern used in the test 28 // The third line is a concatenation of the match, the number of groups, 33 ^(a)?a 34 a 35 true a 1 37 ^(a){0,1}a 38 a 39 true a 1 [all …]
|
/libcore/ojluni/src/main/java/java/nio/ |
D | Bits.java | 76 static char getCharL(long a) { in getCharL() argument 77 return makeChar(_get(a + 1), in getCharL() 78 _get(a )); in getCharL() 86 static char getCharB(long a) { in getCharB() argument 87 return makeChar(_get(a ), in getCharB() 88 _get(a + 1)); in getCharB() 95 static char getChar(long a, boolean bigEndian) { in getChar() argument 96 return bigEndian ? getCharB(a) : getCharL(a); in getChar() 107 static void putCharL(long a, char x) { in putCharL() argument 108 _put(a , char0(x)); in putCharL() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigDecimalConvertTest.java | 37 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/ |
D | StrictMath.java | 167 public static native double sin(double a); in sin() argument 183 public static native double cos(double a); in cos() argument 199 public static native double tan(double a); in tan() argument 216 public static native double asin(double a); in asin() argument 233 public static native double acos(double a); in acos() argument 253 public static native double atan(double a); in atan() argument 309 public static native double exp(double a); in exp() argument 332 public static native double log(double a); in log() argument 358 public static native double log10(double a); in log10() argument 381 public static native double sqrt(double a); in sqrt() argument [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | Authenticator.java | 122 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 …]
|