/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 | 219 return (Comparator<T> & Serializable) (c1, c2) -> { in thenComparing() 220 int res = compare(c1, c2); in thenComparing() 221 return (res != 0) ? res : other.compare(c1, c2); in thenComparing() 440 (c1, c2) -> keyComparator.compare(keyExtractor.apply(c1), in comparing() 473 (c1, c2) -> keyExtractor.apply(c1).compareTo(keyExtractor.apply(c2)); in comparing() 494 (c1, c2) -> Integer.compare(keyExtractor.applyAsInt(c1), keyExtractor.applyAsInt(c2)); in comparingInt() 515 (c1, c2) -> Long.compare(keyExtractor.applyAsLong(c1), keyExtractor.applyAsLong(c2)); in comparingLong() 536 … (c1, c2) -> Double.compare(keyExtractor.applyAsDouble(c1), keyExtractor.applyAsDouble(c2)); in comparingDouble()
|
/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/ojluni/src/main/java/java/lang/ |
D | CharSequence.java | 208 char c1 = charAt(i++); in codePoints() local 209 if (!Character.isHighSurrogate(c1) || i >= length) { in codePoints() 210 block.accept(c1); in codePoints() 215 block.accept(Character.toCodePoint(c1, c2)); in codePoints() 217 block.accept(c1); in codePoints() 236 char c1 = charAt(cur++); in codePoints() local 237 if (Character.isHighSurrogate(c1) && cur < length) { in codePoints() 241 return Character.toCodePoint(c1, c2); in codePoints() 244 return c1; in codePoints()
|
D | StringLatin1.java | 142 char c1 = getChar(value, k); in compareToUTF16Values() local 144 if (c1 != c2) { in compareToUTF16Values() 145 return c1 - c2; in compareToUTF16Values() 160 char c1 = (char) Character.toUpperCase(getChar(value, k)); in compareToCI() local 162 if (c1 != c2) { in compareToCI() 163 c1 = Character.toLowerCase(c1); in compareToCI() 165 if (c1 != c2) { in compareToCI() 166 return c1 - c2; in compareToCI() 179 char c1 = getChar(value, k); in compareToCI_UTF16() local 181 if (c1 != c2) { in compareToCI_UTF16() [all …]
|
D | StringUTF16.java | 106 char c1 = getChar(value, index); 107 if (Character.isHighSurrogate(c1) && ++index < end) { 113 return Character.toCodePoint(c1, c2); 116 return c1; 134 char c1 = getChar(value, index); 135 if (Character.isHighSurrogate(c1)) { 136 return Character.toCodePoint(c1, c2); 326 char c1 = getChar(value, k); 328 if (c1 != c2) { 329 return c1 - c2; [all …]
|
/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() 324 Currency c1 = Currency.getInstance("TND"); in test_getDefaultFractionDigits() local 325 c1.getDefaultFractionDigits(); in test_getDefaultFractionDigits() 326 assertEquals(" Currency.getInstance(\"" + c1 in test_getDefaultFractionDigits() 327 + "\") returned incorrect number of digits. ", 3, c1 in test_getDefaultFractionDigits()
|
/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/ojluni/src/test/java/io/Serializable/records/ |
D | CycleTest.java | 93 record R2 (int x, int y, C c1, C c2) implements Serializable { } 101 C c1 = new C(); in testCycle3() local 103 c1.obj = c2; // --\-- cycle in testCycle3() 104 c2.obj = c1; // \- cycle in testCycle3() 105 R2 r = new R2(5, 6, c1, c2); in testCycle3() 113 c1 = deserializedObj.c1(); in testCycle3() 115 assertTrue(c1.obj == c2); in testCycle3() 116 assertTrue(c2.obj == c1); in testCycle3()
|
D | StreamRefTest.java | 86 C c1 = (C)deserializeOne(bytes); in basicRef() local 91 assertTrue(b1 == c1.b); in basicRef() 92 assertTrue(c1 == d1.c); in basicRef() 106 C c1 = (C)deserializeOne(bytes); in reverseBasicRef() local 111 assertTrue(b1 == c1.b); in reverseBasicRef() 112 assertTrue(c1 == d1.c); in reverseBasicRef()
|
/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 …]
|
/libcore/ojluni/src/test/java/text/Collator/ |
D | CollatorTest.java | 54 int c1, c2, count = 0; in assertEqual() local 56 c1 = i1.next(); in assertEqual() 58 if (c1 != c2) { in assertEqual() 59 errln(" " + count + ": " + c1 + " != " + c2); in assertEqual() 63 } while (c1 != CollationElementIterator.NULLORDER); in assertEqual()
|
/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/ojluni/src/test/java/net/URLEncoder/ |
D | EncodingTest.java | 86 String charactersRange(char c1, char c2) { in charactersRange() argument 87 StringBuilder sb = new StringBuilder(c2 - c1); in charactersRange() 88 for (char c = c1; c < c2; c++) { in charactersRange()
|
/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/ojluni/src/test/java/net/URLDecoder/ |
D | EncodingTest.java | 115 String charactersRange(char c1, char c2) { in charactersRange() argument 116 StringBuilder sb = new StringBuilder(c2 - c1); in charactersRange() 117 for (char c = c1; c < c2; c++) { in charactersRange()
|
/libcore/ojluni/src/test/java/util/Collection/ |
D | BiggernYours.java | 61 static void compareCollections(Collection c1, Collection c2) { in compareCollections() argument 62 Object[] c1Array = c1.toArray(); in compareCollections() 140 static void testCollections(Collection c1, Collection c2) { 142 compareCollections(c1, c2); 144 for (Collection c : new Collection[]{c1, c2}) { 147 compareCollections(c1, c2);
|