/libcore/luni/src/test/java/tests/security/cert/ |
D | CertificateTest.java | 63 Certificate c1 = new MyCertificate("TEST_TYPE", testEncoding); in testCertificate() local 64 assertTrue(Arrays.equals(testEncoding, c1.getEncoded())); in testCertificate() 65 assertEquals("TEST", c1.getPublicKey().getAlgorithm()); in testCertificate() 67 c1.getPublicKey().getEncoded())); in testCertificate() 68 assertEquals("TEST_FORMAT", c1.getPublicKey().getFormat()); in testCertificate() 69 assertEquals("TEST_TYPE", c1.getType()); in testCertificate() 78 Certificate c1 = new MyCertificate("TEST_TYPE", testEncoding); in testHashCode() local 81 assertTrue(c1.hashCode() == c2.hashCode()); in testHashCode() 83 assertFalse(c1.hashCode() == new MyCertificate("TEST_TYPE", cert in testHashCode() 85 assertFalse(c1.hashCode() == cert.hashCode()); in testHashCode() [all …]
|
D | CertificateCertificateRepTest.java | 32 MyCertificate c1 = new MyCertificate("TEST_TYPE", testEncoding); in testCertificateCertificateRep() local 33 MyCertificateRep rep = c1.new MyCertificateRep("TEST_TYPE", new byte[] { in testCertificateCertificateRep() 41 c1.new MyCertificateRep(null, null); in testCertificateCertificateRep() 47 MyCertificate.MyCertificateRep rep1 = c1.new MyCertificateRep( in testCertificateCertificateRep() 60 MyCertificate c1 = new MyCertificate("TEST_TYPE", testEncoding); in testReadResolve() local 61 MyCertificateRep rep = c1.new MyCertificateRep("TEST_TYPE", new byte[] { in testReadResolve() 71 MyCertificateRep rep1 = c1.new MyCertificateRep("X509", TestUtils in testReadResolve()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | ConcatTest.java | 85 …public static Object[] createTests(String scenario, Collection<Integer> c1, Collection<Integer> c2… in createTests() argument 87 new ConcatTest(scenario, c1, c2, expected) in createTests() 92 protected final Collection<Integer> c1; field in ConcatTest 96 …public ConcatTest(String scenario, Collection<Integer> c1, Collection<Integer> c2, Collection<Inte… in ConcatTest() argument 98 this.c1 = c1; in ConcatTest() 109 Stream<Integer> s1s = c1.stream(); in checkPrerequisites() 111 Stream<Integer> s1p = c1.parallelStream(); in checkPrerequisites() 119 … assertTrue(s1s.spliterator().hasCharacteristics(Spliterator.ORDERED), c1.getClass().toString()); in checkPrerequisites() 121 … assertTrue(s2s.spliterator().hasCharacteristics(Spliterator.ORDERED), c1.getClass().toString()); in checkPrerequisites() 177 assertRefConcat(c1.stream(), c2.stream(), false, true); in testRefConcat() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetTest.java | 287 Charset c1 = Charset.forName("US-ASCII"); in testRequiredCharsetSupported() local 530 MockCharset c1 = new MockCharset("mock", null); in testCompareTo_Normal() local 531 assertEquals(0, c1.compareTo(c1)); in testCompareTo_Normal() 534 assertEquals(0, c1.compareTo(c2)); in testCompareTo_Normal() 537 assertTrue(c1.compareTo(c2) < 0); in testCompareTo_Normal() 538 assertTrue(c2.compareTo(c1) > 0); in testCompareTo_Normal() 541 assertTrue(c1.compareTo(c2) > 0); in testCompareTo_Normal() 542 assertTrue(c2.compareTo(c1) < 0); in testCompareTo_Normal() 545 assertTrue(c1.compareTo(c2) > 0); in testCompareTo_Normal() 546 assertTrue(c2.compareTo(c1) < 0); in testCompareTo_Normal() [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() 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/java/lang/ |
D | CharSequence.java | 187 char c1 = charAt(i++); in codePoints() local 188 if (!Character.isHighSurrogate(c1) || i >= length) { in codePoints() 189 block.accept(c1); in codePoints() 194 block.accept(Character.toCodePoint(c1, c2)); in codePoints() 196 block.accept(c1); in codePoints() 215 char c1 = charAt(cur++); in codePoints() local 216 if (Character.isHighSurrogate(c1) && cur < length) { in codePoints() 220 return Character.toCodePoint(c1, c2); in codePoints() 223 return c1; in codePoints()
|
D | String.java | 1199 char c1 = s1.charAt(i); in compare() local 1201 if (c1 != c2) { in compare() 1202 c1 = Character.toUpperCase(c1); in compare() 1204 if (c1 != c2) { in compare() 1205 c1 = Character.toLowerCase(c1); in compare() 1207 if (c1 != c2) { in compare() 1209 return c1 - c2; in compare() 1356 char c1 = charAt(to++); in regionMatches() local 1358 if (c1 == c2) { in regionMatches() 1366 char u1 = Character.toUpperCase(c1); in regionMatches()
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | ASCIICaseInsensitiveComparator.java | 44 char c1 = s1.charAt(i); in compare() 46 assert c1 <= '\u007F' && c2 <= '\u007F'; in compare() 47 if (c1 != c2) { in compare() 48 c1 = (char)toLower(c1); in compare() 50 if (c1 != c2) { in compare() 51 return c1 - c2; in compare()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | Collections2Test.java | 346 Collection<Object> c1 = new ArrayList<Object>(); in test_Disjoint() local 348 Collections.addAll(c1, arr1); in test_Disjoint() 350 assertTrue(Collections.disjoint(c1, c2)); in test_Disjoint() 351 c1.add(arr2[10]); in test_Disjoint() 352 assertFalse(Collections.disjoint(c1, c2)); in test_Disjoint() 354 c1 = new LinkedList<Object>(); in test_Disjoint() 356 Collections.addAll(c1, arr1); in test_Disjoint() 358 assertTrue(Collections.disjoint(c1, c2)); in test_Disjoint() 359 c1.add(arr2[10]); in test_Disjoint() 360 assertFalse(Collections.disjoint(c1, c2)); in test_Disjoint() [all …]
|
D | CurrencyTest.java | 60 Currency c1 = Currency.getInstance(new Locale("en", "CA")); in test_getInstanceLjava_util_Locale() local 63 c1 == c0); in test_getInstanceLjava_util_Locale() 74 c1 = Currency.getInstance(new Locale("ja", "JP")); in test_getInstanceLjava_util_Locale() 77 c1 == c0); in test_getInstanceLjava_util_Locale() 323 Currency c1 = Currency.getInstance("TND"); in test_getDefaultFractionDigits() local 324 c1.getDefaultFractionDigits(); in test_getDefaultFractionDigits() 325 assertEquals(" Currency.getInstance(\"" + c1 in test_getDefaultFractionDigits() 326 + "\") returned incorrect number of digits. ", 3, c1 in test_getDefaultFractionDigits()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | DateUtilsBridge.java | 150 /* package */ 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/util/ |
D | OldCollectionsTest.java | 519 Collection<Object> c1 = new ArrayList<Object>(); in test_Disjoint() local 521 Collections.addAll(c1, arr1); in test_Disjoint() 523 assertTrue(Collections.disjoint(c1, c2)); in test_Disjoint() 524 c1.add(arr2[10]); in test_Disjoint() 525 assertFalse(Collections.disjoint(c1, c2)); in test_Disjoint() 527 c1 = new LinkedList<Object>(); in test_Disjoint() 529 Collections.addAll(c1, arr1); in test_Disjoint() 531 assertTrue(Collections.disjoint(c1, c2)); in test_Disjoint() 532 c1.add(arr2[10]); in test_Disjoint() 533 assertFalse(Collections.disjoint(c1, c2)); in test_Disjoint() [all …]
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | ChronologyTest.java | 47 for (Chronology c1 : 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/luni/src/test/java/tests/java/security/ |
D | IdentityTest.java | 127 CertificateStub c1 = new CertificateStub("fff", null, null, pk1); in testAddCertificate1() local 128 i.addCertificate(c1); in testAddCertificate1() 129 assertSame(c1, i.certificates()[0]); in testAddCertificate1() 144 CertificateStub c1 = new CertificateStub("fff", null, null, pk1); in testAddCertificate2() local 145 i.addCertificate(c1); in testAddCertificate2() 146 assertSame(c1, i.certificates()[0]); in testAddCertificate2() 195 CertificateStub c1 = new CertificateStub("fff", null, null, pk1); in testCertificates() local 197 i.addCertificate(c1); 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() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | URLConnection.java | 1453 int c1 = 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() 1480 if (c1 == '<') { in guessContentTypeFromStream() 1497 if (c1 == 0xef && c2 == 0xbb && c3 == 0xbf) { in guessContentTypeFromStream() 1504 if (c1 == 0xfe && c2 == 0xff) { in guessContentTypeFromStream() 1511 if (c1 == 0xff && c2 == 0xfe) { in guessContentTypeFromStream() 1519 if (c1 == 0x00 && c2 == 0x00 && c3 == 0xfe && c4 == 0xff) { in guessContentTypeFromStream() 1527 if (c1 == 0xff && c2 == 0xfe && c3 == 0x00 && c4 == 0x00) { in guessContentTypeFromStream() 1535 if (c1 == 'G' && c2 == 'I' && c3 == 'F' && c4 == '8') { 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() 472 if (c1 == null) return -1; in compare() 476 if (!c1.getName().equals(c2.getName())) return 0; in compare() 479 final String c1Path = normalizePath(c1.getPath()); in compare()
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | ConstructorTest.java | 114 Constructor<?> c1 = ConstructorTestHelper.class.getConstructor(); in testEqualConstructorEqualsAndHashCode() local 116 assertEquals(c1, c2); in testEqualConstructorEqualsAndHashCode() 117 assertEquals(c1.hashCode(), c2.hashCode()); in testEqualConstructorEqualsAndHashCode() 121 Constructor<?> c1 = ConstructorTestHelper.class.getConstructor(); in testHashCodeSpec() local 122 assertEquals(ConstructorTestHelper.class.getName().hashCode(), c1.hashCode()); in testHashCodeSpec() 126 Constructor<?> c1 = ConstructorTestHelper.class.getConstructor(); 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 563 assertTrue(c1.equals(c1)); in testEqualsObject01() 566 c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject01() 570 assertTrue(c1.equals(c2) && c2.equals(c1)); in testEqualsObject01() 573 c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject01() 577 assertTrue(c1.equals(c2) && c2.equals(c1)); in testEqualsObject01() 580 c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject01() 585 assertTrue(c1.equals(c3) && c3.equals(c1)); in testEqualsObject01() 588 c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)), in testEqualsObject01() 592 assertTrue(c1.equals(c2) && c2.equals(c1)); in testEqualsObject01()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | CollatorTest.java | 169 Collator c1 = Collator.getInstance(locales[i]); in failing_test_getAvailableLocales() local 170 assertTrue("Doesn't work", c1.compare("a", "b") < 0); in failing_test_getAvailableLocales() 172 c1.getDecomposition() == Collator.NO_DECOMPOSITION); in failing_test_getAvailableLocales() 173 assertTrue("Wrong strength", c1.getStrength() == Collator.TERTIARY); in failing_test_getAvailableLocales() 174 if (c1 instanceof RuleBasedCollator) { in failing_test_getAvailableLocales() 176 new RuleBasedCollator(((RuleBasedCollator) c1).getRules()); in failing_test_getAvailableLocales() 199 Collator c1 = Collator.getInstance(); in test_getInstance() local 201 assertTrue("Wrong locale", c1.equals(c2)); in test_getInstance()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | EqualsHashCodeBenchmark.java | 48 Object c1; field in EqualsHashCodeBenchmark 58 c1 = type.newInstance("http://developer.android.com/query?q=" + QUERY); in setUp() 80 c1.equals(c2); in timeEqualsWithHeavilyEscapedComponent()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | ProviderTest.java | 274 Collection c1 = p.values(); in testValues() local 276 assertNotSame(c, c1); in testValues() 277 assertFalse(c1.isEmpty()); in testValues() 278 assertEquals(8, c1.size()); in testValues() 280 assertTrue(c1.contains("MyProvider")); in testValues() 281 assertTrue(c1.contains("aaa.bbb.ccc.ddd")); in testValues() 282 assertTrue(c1.contains("Provider for testing")); in testValues() 283 assertTrue(c1.contains("1.0")); in testValues() 284 assertTrue(c1.contains("SomeClassName")); in testValues() 285 assertTrue(c1.contains("SHA-1")); in testValues() [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 214 return isSameClassPackage(c1.getClassLoader(), c1.getName(), in isSameClassPackage()
|
/libcore/benchmarks/src/benchmarks/ |
D | ImtConflictBenchmark.java | 37 C1 c1 = new C1(); in setup() local 38 callF0(c1); in setup() 39 callF43(c1); in setup() 292 C1 c1 = new C1(); in timeConflictDepth02() local 294 callF0(c1); in timeConflictDepth02() 295 callF43(c1); in timeConflictDepth02() 296 callF0(c1); in timeConflictDepth02() 297 callF43(c1); in timeConflictDepth02() 298 callF0(c1); in timeConflictDepth02() 299 callF43(c1); in timeConflictDepth02() [all …]
|