/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | ConcatTest.java | 85 …] createTests(String scenario, Collection<Integer> c1, Collection<Integer> c2, Collection<Integer>… in createTests() argument 87 new ConcatTest(scenario, c1, c2, expected) in createTests() 93 protected final Collection<Integer> c2; field in ConcatTest 96 …public ConcatTest(String scenario, Collection<Integer> c1, Collection<Integer> c2, Collection<Inte… in ConcatTest() argument 99 this.c2 = c2; in ConcatTest() 110 Stream<Integer> s2s = c2.stream(); in checkPrerequisites() 112 Stream<Integer> s2p = c2.parallelStream(); in checkPrerequisites() 120 … assertTrue(s1p.spliterator().hasCharacteristics(Spliterator.ORDERED), c2.getClass().toString()); in checkPrerequisites() 122 … assertTrue(s2p.spliterator().hasCharacteristics(Spliterator.ORDERED), c2.getClass().toString()); in checkPrerequisites() 177 assertRefConcat(c1.stream(), c2.stream(), false, true); in testRefConcat() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Comparator.java | 215 return (Comparator<T> & Serializable) (c1, c2) -> { in thenComparing() 216 int res = compare(c1, c2); in thenComparing() 217 return (res != 0) ? res : other.compare(c1, c2); in thenComparing() 436 (c1, c2) -> keyComparator.compare(keyExtractor.apply(c1), in comparing() 437 keyExtractor.apply(c2)); in comparing() 469 (c1, c2) -> keyExtractor.apply(c1).compareTo(keyExtractor.apply(c2)); in comparing() 490 (c1, c2) -> Integer.compare(keyExtractor.applyAsInt(c1), keyExtractor.applyAsInt(c2)); in comparingInt() 511 (c1, c2) -> Long.compare(keyExtractor.applyAsLong(c1), keyExtractor.applyAsLong(c2)); in comparingLong() 532 … (c1, c2) -> Double.compare(keyExtractor.applyAsDouble(c1), keyExtractor.applyAsDouble(c2)); in comparingDouble()
|
D | Comparators.java | 51 public int compare(Comparable<Object> c1, Comparable<Object> c2) { in compare() argument 52 return c1.compareTo(c2); in compare()
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | ASCIICaseInsensitiveComparator.java | 45 char c2 = s2.charAt(i); in compare() 46 assert c1 <= '\u007F' && c2 <= '\u007F'; in compare() 47 if (c1 != c2) { in compare() 49 c2 = (char)toLower(c2); in compare() 50 if (c1 != c2) { in compare() 51 return c1 - c2; in compare()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | DateUtilsBridge.java | 150 public static int dayDistance(Calendar c1, Calendar c2) { in dayDistance() argument 151 return c2.get(Calendar.JULIAN_DAY) - c1.get(Calendar.JULIAN_DAY); in dayDistance() 168 private static boolean fallOnDifferentDates(Calendar c1, Calendar c2) { in fallOnDifferentDates() argument 169 return c1.get(Calendar.YEAR) != c2.get(Calendar.YEAR) || in fallOnDifferentDates() 170 c1.get(Calendar.MONTH) != c2.get(Calendar.MONTH) || in fallOnDifferentDates() 171 c1.get(Calendar.DAY_OF_MONTH) != c2.get(Calendar.DAY_OF_MONTH); in fallOnDifferentDates() 174 private static boolean fallInSameMonth(Calendar c1, Calendar c2) { in fallInSameMonth() argument 175 return c1.get(Calendar.MONTH) == c2.get(Calendar.MONTH); in fallInSameMonth() 178 private static boolean fallInSameYear(Calendar c1, Calendar c2) { in fallInSameYear() argument 179 return c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR); in fallInSameYear()
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | ChronologyTest.java | 48 for (Chronology c2 : chronologies) { in test_compareTo() 49 assertComparesAccordingToId(c1, c2); in test_compareTo() 54 private static void assertComparesAccordingToId(Chronology c1, Chronology c2) { in assertComparesAccordingToId() argument 55 int chronologyResult = c1.compareTo(c2); in assertComparesAccordingToId() 56 int idResult = c1.getId().compareTo(c2.getId()); in assertComparesAccordingToId() 62 assertEquals(c1 + " and " + c2 + " compare as equal.", in assertComparesAccordingToId() 63 chronologyResult == 0, c1.equals(c2)); in assertComparesAccordingToId()
|
/libcore/ojluni/src/main/java/java/net/ |
D | URLConnection.java | 1454 int c2 = is.read(); in guessContentTypeFromStream() local 1471 if (c1 == 0xCA && c2 == 0xFE && c3 == 0xBA && c4 == 0xBE) { in guessContentTypeFromStream() 1475 if (c1 == 0xAC && c2 == 0xED) { in guessContentTypeFromStream() 1481 if (c2 == '!' in guessContentTypeFromStream() 1482 || ((c2 == 'h' && (c3 == 't' && c4 == 'm' && c5 == 'l' || in guessContentTypeFromStream() 1484 (c2 == 'b' && c3 == 'o' && c4 == 'd' && c5 == 'y'))) || in guessContentTypeFromStream() 1485 ((c2 == 'H' && (c3 == 'T' && c4 == 'M' && c5 == 'L' || in guessContentTypeFromStream() 1487 (c2 == 'B' && c3 == 'O' && c4 == 'D' && c5 == 'Y')))) { in guessContentTypeFromStream() 1491 if (c2 == '?' && c3 == 'x' && c4 == 'm' && c5 == 'l' && c6 == ' ') { in guessContentTypeFromStream() 1497 if (c1 == 0xef && c2 == 0xbb && c3 == 0xbf) { in guessContentTypeFromStream() [all …]
|
D | CookieManager.java | 470 public int compare(HttpCookie c1, HttpCookie c2) { in compare() argument 471 if (c1 == c2) return 0; in compare() 473 if (c2 == null) return 1; in compare() 476 if (!c1.getName().equals(c2.getName())) return 0; in compare() 480 final String c2Path = normalizePath(c2.getPath()); in compare()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | CharSequence.java | 191 char c2 = charAt(i); in codePoints() local 192 if (Character.isLowSurrogate(c2)) { in codePoints() 194 block.accept(Character.toCodePoint(c1, c2)); in codePoints() 217 char c2 = charAt(cur); in codePoints() local 218 if (Character.isLowSurrogate(c2)) { in codePoints() 220 return Character.toCodePoint(c1, c2); in codePoints()
|
D | String.java | 1200 char c2 = s2.charAt(i); in compare() local 1201 if (c1 != c2) { in compare() 1203 c2 = Character.toUpperCase(c2); in compare() 1204 if (c1 != c2) { in compare() 1206 c2 = Character.toLowerCase(c2); in compare() 1207 if (c1 != c2) { in compare() 1209 return c1 - c2; in compare() 1357 char c2 = other.charAt(po++); in regionMatches() local 1358 if (c1 == c2) { in regionMatches() 1367 char u2 = Character.toUpperCase(c2); in regionMatches()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | Collections2Test.java | 347 Collection<Object> c2 = new ArrayList<Object>(); in test_Disjoint() local 349 Collections.addAll(c2, arr2); in test_Disjoint() 350 assertTrue(Collections.disjoint(c1, c2)); in test_Disjoint() 352 assertFalse(Collections.disjoint(c1, c2)); in test_Disjoint() 355 c2 = new LinkedList<Object>(); in test_Disjoint() 357 Collections.addAll(c2, arr2); in test_Disjoint() 358 assertTrue(Collections.disjoint(c1, c2)); in test_Disjoint() 360 assertFalse(Collections.disjoint(c1, c2)); in test_Disjoint() 363 c2 = new TreeSet<Object>(); in test_Disjoint() 365 Collections.addAll(c2, arr2); in test_Disjoint() [all …]
|
D | CurrencyTest.java | 64 Currency c2 = Currency.getInstance(new Locale("fr", "CA")); in test_getInstanceLjava_util_Locale() local 67 c2 == c0); in test_getInstanceLjava_util_Locale() 78 c2 = Currency.getInstance(new Locale("", "JP")); in test_getInstanceLjava_util_Locale() 81 c2 == c0); in test_getInstanceLjava_util_Locale() 329 Currency c2 = Currency.getInstance("EUR"); in test_getDefaultFractionDigits() local 330 c2.getDefaultFractionDigits(); in test_getDefaultFractionDigits() 331 assertEquals(" Currency.getInstance(\"" + c2 in test_getDefaultFractionDigits() 332 + "\") returned incorrect number of digits. ", 2, c2 in test_getDefaultFractionDigits()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OldCollectionsTest.java | 520 Collection<Object> c2 = new ArrayList<Object>(); in test_Disjoint() local 522 Collections.addAll(c2, arr2); in test_Disjoint() 523 assertTrue(Collections.disjoint(c1, c2)); in test_Disjoint() 525 assertFalse(Collections.disjoint(c1, c2)); in test_Disjoint() 528 c2 = new LinkedList<Object>(); in test_Disjoint() 530 Collections.addAll(c2, arr2); in test_Disjoint() 531 assertTrue(Collections.disjoint(c1, c2)); in test_Disjoint() 533 assertFalse(Collections.disjoint(c1, c2)); in test_Disjoint() 536 c2 = new TreeSet<Object>(); in test_Disjoint() 538 Collections.addAll(c2, arr2); in test_Disjoint() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetTest.java | 533 MockCharset c2 = new MockCharset("Mock", null); in testCompareTo_Normal() local 534 assertEquals(0, c1.compareTo(c2)); in testCompareTo_Normal() 536 c2 = new MockCharset("mock2", null); in testCompareTo_Normal() 537 assertTrue(c1.compareTo(c2) < 0); in testCompareTo_Normal() 538 assertTrue(c2.compareTo(c1) > 0); in testCompareTo_Normal() 540 c2 = new MockCharset("mack", null); in testCompareTo_Normal() 541 assertTrue(c1.compareTo(c2) > 0); in testCompareTo_Normal() 542 assertTrue(c2.compareTo(c1) < 0); in testCompareTo_Normal() 544 c2 = new MockCharset("m.", null); in testCompareTo_Normal() 545 assertTrue(c1.compareTo(c2) > 0); in testCompareTo_Normal() [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | StreamTokenizer.java | 649 int c2 = read(); in nextToken() 650 if ('0' <= c2 && c2 <= '7') { in nextToken() 651 c = (c << 3) + (c2 - '0'); in nextToken() 652 c2 = read(); in nextToken() 653 if ('0' <= c2 && c2 <= '7' && first <= '3') { in nextToken() 654 c = (c << 3) + (c2 - '0'); in nextToken() 657 d = c2; in nextToken() 659 d = c2; in nextToken()
|
D | DataInputStream.java | 516 int c2 = in.read(); in readLine() local 517 if ((c2 != '\n') && (c2 != -1)) { in readLine() 521 ((PushbackInputStream)in).unread(c2); in readLine()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | CollatorTest.java | 28 Collator c2 = (Collator) c.clone(); in test_clone() local 29 assertTrue("Clones answered false to equals", c.equals(c2)); in test_clone() 30 assertTrue("Clones were equivalent", c != c2); in test_clone() 118 Collator c2 = (Collator) c.clone(); in test_equalsLjava_lang_Object() local 119 assertTrue("Cloned collators not equal", c.equals(c2)); in test_equalsLjava_lang_Object() 120 c2.setStrength(Collator.SECONDARY); in test_equalsLjava_lang_Object() 121 assertTrue("Collators with different strengths equal", !c.equals(c2)); in test_equalsLjava_lang_Object() 200 Collator c2 = Collator.getInstance(Locale.getDefault()); in test_getInstance() local 201 assertTrue("Wrong locale", c1.equals(c2)); in test_getInstance()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | EqualsHashCodeBenchmark.java | 49 Object c2; field in EqualsHashCodeBenchmark 60 …c2 = type.newInstance("http://developer.android.com/query?q=" + QUERY.substring(0, QUERY.length() … in setUp() 80 c1.equals(c2); in timeEqualsWithHeavilyEscapedComponent()
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | CertificateTest.java | 79 Certificate c2 = new MyCertificate("TEST_TYPE", testEncoding); in testHashCode() local 81 assertTrue(c1.hashCode() == c2.hashCode()); in testHashCode() 94 Certificate c2 = new MyCertificate("TEST_TYPE", testEncoding); in testHashCodeEqualsObject() local 96 assertTrue((c1.hashCode() == c2.hashCode()) && c1.equals(c2)); in testHashCodeEqualsObject() 135 Certificate c2 = new MyCertificate("TEST_TYPE", testEncoding); in testEqualsObject02() local 136 assertTrue(c1.equals(c2) && c2.equals(c1)); in testEqualsObject02()
|
/libcore/luni/src/test/java/tests/java/security/ |
D | IdentityTest.java | 196 CertificateStub c2 = new CertificateStub("zzz", null, null, pk1); in testCertificates() local 198 i.addCertificate(c2); in testCertificates() 201 assertTrue(c1.equals(s[0]) || c2.equals(s[0])); in testCertificates() 202 assertTrue(c1.equals(s[1]) || c2.equals(s[1])); in testCertificates() 208 assertTrue(c1.equals(s[0]) || c2.equals(s[0])); in testCertificates() 209 assertTrue(c1.equals(s[1]) || c2.equals(s[1])); in testCertificates() 302 CertificateStub c2 = new CertificateStub("zzz", null, null, pk1); in testSetPublicKey4() local 304 i.addCertificate(c2); in testSetPublicKey4()
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | ConstructorTest.java | 115 Constructor<?> c2 = ConstructorTestHelper.class.getConstructor(); in testEqualConstructorEqualsAndHashCode() local 116 assertEquals(c1, c2); in testEqualConstructorEqualsAndHashCode() 117 assertEquals(c1.hashCode(), c2.hashCode()); in testEqualConstructorEqualsAndHashCode() 127 Constructor<?> c2 = ConstructorTestHelper.class.getConstructor(Object.class); in testDifferentConstructorEqualsAndHashCode() local 128 assertFalse(c1.equals(c2)); in testDifferentConstructorEqualsAndHashCode()
|
/libcore/luni/src/test/java/tests/security/spec/ |
D | EllipticCurveTest.java | 560 EllipticCurve c2 = null, c1 = new EllipticCurve(new ECFieldFp( in testEqualsObject01() local 568 c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject01() 570 assertTrue(c1.equals(c2) && c2.equals(c1)); in testEqualsObject01() 575 c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject01() 577 assertTrue(c1.equals(c2) && c2.equals(c1)); in testEqualsObject01() 590 c2 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject01() 592 assertTrue(c1.equals(c2) && c2.equals(c1)); in testEqualsObject01()
|
/libcore/benchmarks/src/benchmarks/ |
D | ImtConflictBenchmark.java | 40 C2 c2 = new C2(); in setup() local 41 callF0(c2); in setup() 42 callF43(c2); in setup() 43 callF86(c2); in setup() 317 C2 c2 = new C2(); in timeConflictDepth03() local 319 callF0(c2); in timeConflictDepth03() 320 callF43(c2); in timeConflictDepth03() 321 callF86(c2); in timeConflictDepth03() 322 callF0(c2); in timeConflictDepth03() 323 callF43(c2); in timeConflictDepth03() [all …]
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeParseContext.java | 255 static boolean charEqualsIgnoreCase(char c1, char c2) { in charEqualsIgnoreCase() argument 256 return c1 == c2 || in charEqualsIgnoreCase() 257 Character.toUpperCase(c1) == Character.toUpperCase(c2) || in charEqualsIgnoreCase() 258 Character.toLowerCase(c1) == Character.toLowerCase(c2); in charEqualsIgnoreCase()
|
/libcore/ojluni/src/main/java/sun/reflect/ |
D | Reflection.java | 213 private static boolean isSameClassPackage(Class<?> c1, Class<?> c2) { in isSameClassPackage() argument 215 c2.getClassLoader(), c2.getName()); in isSameClassPackage()
|