Home
last modified time | relevance | path

Searched refs:c2 (Results 1 – 25 of 61) sorted by relevance

123

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DConcatTest.java85 …] 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/
DComparator.java219 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()
441 keyExtractor.apply(c2)); 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/
DASCIICaseInsensitiveComparator.java45 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/ojluni/src/main/java/java/net/
DURLConnection.java1454 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 …]
/libcore/ojluni/src/test/java/io/Serializable/records/
DCycleTest.java93 record R2 (int x, int y, C c1, C c2) implements Serializable { }
102 C c2 = 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()
114 c2 = deserializedObj.c2(); in testCycle3()
115 assertTrue(c1.obj == c2); in testCycle3()
116 assertTrue(c2.obj == c1); in testCycle3()
/libcore/luni/src/test/java/libcore/java/time/chrono/
DChronologyTest.java48 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/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DCollections2Test.java347 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 …]
DCurrencyTest.java64 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()
330 Currency c2 = Currency.getInstance("EUR"); in test_getDefaultFractionDigits() local
331 c2.getDefaultFractionDigits(); in test_getDefaultFractionDigits()
332 assertEquals(" Currency.getInstance(\"" + c2 in test_getDefaultFractionDigits()
333 + "\") returned incorrect number of digits. ", 2, c2 in test_getDefaultFractionDigits()
/libcore/luni/src/test/java/libcore/java/util/
DOldCollectionsTest.java520 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/
DCharsetTest.java533 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/lang/
DCharSequence.java212 char c2 = charAt(i); in codePoints() local
213 if (Character.isLowSurrogate(c2)) { in codePoints()
215 block.accept(Character.toCodePoint(c1, c2)); in codePoints()
238 char c2 = charAt(cur); in codePoints() local
239 if (Character.isLowSurrogate(c2)) { in codePoints()
241 return Character.toCodePoint(c1, c2); in codePoints()
DStringLatin1.java143 char c2 = StringUTF16.getChar(other, k); in compareToUTF16Values() local
144 if (c1 != c2) { in compareToUTF16Values()
145 return c1 - c2; in compareToUTF16Values()
161 char c2 = (char) Character.toUpperCase(getChar(other, k)); in compareToCI() local
162 if (c1 != c2) { in compareToCI()
164 c2 = Character.toLowerCase(c2); in compareToCI()
165 if (c1 != c2) { in compareToCI()
166 return c1 - c2; in compareToCI()
180 char c2 = StringUTF16.getChar(other, k); in compareToCI_UTF16() local
181 if (c1 != c2) { in compareToCI_UTF16()
[all …]
DStringUTF16.java111 char c2 = getChar(value, index);
112 if (Character.isLowSurrogate(c2)) {
113 return Character.toCodePoint(c1, c2);
128 char c2 = getChar(value, index);
129 if (Character.isLowSurrogate(c2) && index > 0) {
136 return Character.toCodePoint(c1, c2);
139 return c2;
327 char c2 = getChar(other, k);
328 if (c1 != c2) {
329 return c1 - c2;
[all …]
/libcore/ojluni/src/main/java/java/io/
DStreamTokenizer.java649 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()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DCollatorTest.java28 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/ojluni/src/test/java/net/URLEncoder/
DEncodingTest.java86 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/luni/src/test/java/tests/java/security/
DIdentityTest.java196 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/tests/security/cert/
DCertificateTest.java79 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/ojluni/src/test/java/text/Collator/
DCollatorTest.java54 int c1, c2, count = 0; in assertEqual() local
57 c2 = i2.next(); in assertEqual()
58 if (c1 != c2) { in assertEqual()
59 errln(" " + count + ": " + c1 + " != " + c2); in assertEqual()
/libcore/benchmarks/src/benchmarks/regression/
DEqualsHashCodeBenchmark.java49 Object c2; field in EqualsHashCodeBenchmark
60c2 = type.newInstance("http://developer.android.com/query?q=" + QUERY.substring(0, QUERY.length() … in setUp()
80 c1.equals(c2); in timeEqualsWithHeavilyEscapedComponent()
/libcore/ojluni/src/test/java/net/URLDecoder/
DEncodingTest.java115 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/
DBiggernYours.java61 static void compareCollections(Collection c1, Collection c2) { in compareCollections() argument
63 Object[] c2Array = c2.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);
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DConstructorTest.java115 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/
DEllipticCurveTest.java560 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/
DImtConflictBenchmark.java40 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 …]

123