/libcore/ojluni/src/test/java/time/tck/java/time/zone/ |
D | TCKZoneOffsetTransition.java | 185 assertEquals(a.compareTo(a) == 0, true); in test_compareTo() 186 assertEquals(a.compareTo(b) < 0, true); in test_compareTo() 187 assertEquals(a.compareTo(c) < 0, true); in test_compareTo() 189 assertEquals(b.compareTo(a) > 0, true); in test_compareTo() 190 assertEquals(b.compareTo(b) == 0, true); in test_compareTo() 191 assertEquals(b.compareTo(c) < 0, true); in test_compareTo() 193 assertEquals(c.compareTo(a) > 0, true); in test_compareTo() 194 assertEquals(c.compareTo(b) > 0, true); in test_compareTo() 195 assertEquals(c.compareTo(c) == 0, true); in test_compareTo() 207 assertEquals(a.compareTo(a) == 0, true); in test_compareTo_sameInstant() [all …]
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | OldBigDecimalScaleOperationsTest.java | 86 assertEquals(0, x1.compareTo(x2)); in testSetScale() 87 assertEquals(0, x2.compareTo(x1)); in testSetScale() 91 assertEquals(0, x1.compareTo(x2)); in testSetScale() 92 assertEquals(0, x2.compareTo(x1)); in testSetScale() 96 assertEquals(0, x1.compareTo(x2)); in testSetScale() 97 assertEquals(0, x2.compareTo(x1)); in testSetScale()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringTest.java | 360 assertEquals(-1, "a".compareTo("b")); in test_compareTo() 361 assertEquals(-2, "a".compareTo("c")); in test_compareTo() 362 assertEquals(1, "b".compareTo("a")); in test_compareTo() 363 assertEquals(2, "c".compareTo("a")); in test_compareTo() 367 assertEquals(0, "a".compareTo("a")); in test_compareTo() 368 assertEquals(-1, "a".compareTo("aa")); in test_compareTo() 369 assertEquals(-1, "a".compareTo("az")); in test_compareTo() 370 assertEquals(-2, "a".compareTo("aaa")); in test_compareTo() 371 assertEquals(-2, "a".compareTo("azz")); in test_compareTo() 372 assertEquals(-3, "a".compareTo("aaaa")); in test_compareTo() [all …]
|
D | OldAndroidEnumTest.java | 40 assertTrue(MyEnum.ZERO.compareTo(MyEnum.ONE) < 0); in testEnum() 42 assertTrue(MyEnum.TWO.compareTo(MyEnum.ONE) > 0); in testEnum() 43 assertTrue(MyEnum.FOUR.compareTo(MyEnum.ONE) > 0); in testEnum()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | CollationKeyICU.java | 30 public int compareTo(CollationKey other) { in compareTo() method in CollationKeyICU 39 return key.compareTo(otherKey); in compareTo() 50 return compareTo((CollationKey) object) == 0; in equals()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerCompareTest.java | 77 assertEquals(1, aNumber.compareTo(bNumber)); in testCompareToPosPos1() 92 assertEquals(-1, aNumber.compareTo(bNumber)); in testCompareToPosPos2() 106 assertEquals(0, aNumber.compareTo(bNumber)); in testCompareToEqualPos() 121 assertEquals(-1, aNumber.compareTo(bNumber)); in testCompareToNegNeg1() 136 assertEquals(1, aNumber.compareTo(bNumber)); in testCompareNegNeg2() 150 assertEquals(0, aNumber.compareTo(bNumber)); in testCompareToEqualNeg() 165 assertEquals(1, aNumber.compareTo(bNumber)); in testCompareToDiffSigns1() 180 assertEquals(-1, aNumber.compareTo(bNumber)); in testCompareToDiffSigns2() 192 assertEquals(1, aNumber.compareTo(bNumber)); in testCompareToPosZero() 204 assertEquals(-1, aNumber.compareTo(bNumber)); in testCompareToZeroPos() [all …]
|
D | OldBigIntegerTest.java | 52 assertTrue("Random number is negative", bi.compareTo(BigInteger.ZERO) >= 0); in test_ConstructorILjava_util_Random() 53 assertTrue("Random number is too big", bi.compareTo(two.pow(70)) < 0); in test_ConstructorILjava_util_Random() 74 assertTrue(bi1 + " is negative", bi1.compareTo(BigInteger.ZERO) >= 0); in test_ConstructorIILjava_util_Random() 75 assertTrue(bi1 + " is too big", bi1.compareTo(new BigInteger("1024", 10)) < 0); in test_ConstructorIILjava_util_Random() 76 assertTrue(bi2 + " is negative", bi2.compareTo(BigInteger.ZERO) >= 0); in test_ConstructorIILjava_util_Random() 77 assertTrue(bi2 + " is too big", bi2.compareTo(new BigInteger("1024", 10)) < 0); in test_ConstructorIILjava_util_Random()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ByteTest.java | 361 assertTrue(max.compareTo(max) == 0); in test_compareToLjava_lang_Byte() 362 assertTrue(min.compareTo(min) == 0); in test_compareToLjava_lang_Byte() 363 assertTrue(zero.compareTo(zero) == 0); in test_compareToLjava_lang_Byte() 365 assertTrue(max.compareTo(zero) > 0); in test_compareToLjava_lang_Byte() 366 assertTrue(max.compareTo(min) > 0); in test_compareToLjava_lang_Byte() 368 assertTrue(zero.compareTo(max) < 0); in test_compareToLjava_lang_Byte() 369 assertTrue(zero.compareTo(min) > 0); in test_compareToLjava_lang_Byte() 371 assertTrue(min.compareTo(zero) < 0); in test_compareToLjava_lang_Byte() 372 assertTrue(min.compareTo(max) < 0); in test_compareToLjava_lang_Byte() 375 min.compareTo(null); in test_compareToLjava_lang_Byte() [all …]
|
D | BooleanTest.java | 146 assertTrue(Boolean.TRUE.compareTo(Boolean.TRUE) == 0); in test_compareToLjava_lang_Boolean() 147 assertTrue(Boolean.FALSE.compareTo(Boolean.FALSE) == 0); in test_compareToLjava_lang_Boolean() 148 assertTrue(Boolean.TRUE.compareTo(Boolean.FALSE) > 0); in test_compareToLjava_lang_Boolean() 149 assertTrue(Boolean.FALSE.compareTo(Boolean.TRUE) < 0); in test_compareToLjava_lang_Boolean() 152 Boolean.TRUE.compareTo(null); in test_compareToLjava_lang_Boolean()
|
D | EnumTest.java | 60 assertTrue(0 < Sample.MOE.compareTo(Sample.LARRY)); in test_compareToLjava_lang_Enum() 61 assertEquals(0, Sample.MOE.compareTo(Sample.MOE)); in test_compareToLjava_lang_Enum() 62 assertTrue(0 > Sample.MOE.compareTo(Sample.CURLY)); in test_compareToLjava_lang_Enum() 64 Sample.MOE.compareTo((Sample) null); in test_compareToLjava_lang_Enum()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
D | MacThread.java | 52 if (sign1.compareTo(sign2) != 0 || sign1.compareTo(sign3) == 0 || in test() 53 sign2.compareTo(sign3) == 0) { in test()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKOffsetDateTime.java | 1307 assertEquals(a.compareTo(b) < 0, true); 1308 assertEquals(b.compareTo(a) > 0, true); 1309 assertEquals(a.compareTo(a) == 0, true); 1310 assertEquals(b.compareTo(b) == 0, true); 1311 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1319 assertEquals(a.compareTo(b) < 0, true); 1320 assertEquals(b.compareTo(a) > 0, true); 1321 assertEquals(a.compareTo(a) == 0, true); 1322 assertEquals(b.compareTo(b) == 0, true); 1323 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | ComparableTimSort.java | 262 if (pivot.compareTo(a[mid]) < 0) in binarySort() 320 if (((Comparable) a[runHi++]).compareTo(a[lo]) < 0) { // Descending in countRunAndMakeAscending() 321 while (runHi < hi && ((Comparable) a[runHi]).compareTo(a[runHi - 1]) < 0) in countRunAndMakeAscending() 325 while (runHi < hi && ((Comparable) a[runHi]).compareTo(a[runHi - 1]) >= 0) in countRunAndMakeAscending() 509 if (key.compareTo(a[base + hint]) > 0) { in gallopLeft() 512 while (ofs < maxOfs && key.compareTo(a[base + hint + ofs]) > 0) { in gallopLeft() 527 while (ofs < maxOfs && key.compareTo(a[base + hint - ofs]) <= 0) { in gallopLeft() 552 if (key.compareTo(a[base + m]) > 0) in gallopLeft() 579 if (key.compareTo(a[base + hint]) < 0) { in gallopRight() 582 while (ofs < maxOfs && key.compareTo(a[base + hint - ofs]) < 0) { in gallopRight() [all …]
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | ChronoUnit.java | 227 return this.compareTo(DAYS) >= 0; in isDurationEstimated() 241 return this.compareTo(DAYS) >= 0 && this != FOREVER; in isDateBased() 254 return this.compareTo(DAYS) < 0; in isTimeBased()
|
/libcore/luni/src/test/java/libcore/java/util/function/ |
D | BinaryOperatorTest.java | 27 Comparator<String> stringComparator = String::compareTo; in testMinBy() 39 Comparator<String> stringComparator = String::compareTo; in testMaxBy()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetTest.java | 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() 549 assertEquals("mock".compareToIgnoreCase("m:"), c1.compareTo(c2)); in testCompareTo_Normal() 550 assertEquals("m:".compareToIgnoreCase("mock"), c2.compareTo(c1)); in testCompareTo_Normal() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
D | FloatBufferTest.java | 162 buf.compareTo(null); in testCompareTo() 169 assertEquals(0, buf.compareTo(buf)); in testCompareTo() 176 assertEquals(0, buf.compareTo(other)); in testCompareTo() 177 assertEquals(0, other.compareTo(buf)); in testCompareTo() 179 assertTrue(buf.compareTo(other) > 0); in testCompareTo() 180 assertTrue(other.compareTo(buf) < 0); in testCompareTo() 182 assertTrue(buf.compareTo(other) < 0); in testCompareTo() 183 assertTrue(other.compareTo(buf) > 0); in testCompareTo() 186 assertTrue(buf.compareTo(other) > 0); in testCompareTo() 187 assertTrue(other.compareTo(buf) < 0); in testCompareTo() [all …]
|
D | DoubleBufferTest.java | 186 assertEquals(0, buf.compareTo(other)); in testCompareTo() 187 assertEquals(0, other.compareTo(buf)); in testCompareTo() 189 assertTrue(buf.compareTo(other) > 0); in testCompareTo() 190 assertTrue(other.compareTo(buf) < 0); in testCompareTo() 192 assertTrue(buf.compareTo(other) < 0); in testCompareTo() 193 assertTrue(other.compareTo(buf) > 0); in testCompareTo() 196 assertTrue(buf.compareTo(other) > 0); in testCompareTo() 197 assertTrue(other.compareTo(buf) < 0); in testCompareTo() 204 .compareTo(dbuffer2)); in testCompareTo() 206 .compareTo(dbuffer1)); in testCompareTo() [all …]
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | ChronologyTest.java | 55 int chronologyResult = c1.compareTo(c2); in assertComparesAccordingToId() 56 int idResult = c1.getId().compareTo(c2.getId()); in assertComparesAccordingToId() 68 IsoChronology.INSTANCE.compareTo(null); in test_compareTo_null()
|
/libcore/ojluni/src/main/java/java/sql/ |
D | Timestamp.java | 447 return compareTo(ts) < 0; in before() 459 return compareTo(ts) > 0; in after() 475 public int compareTo(Timestamp ts) { in compareTo() method in Timestamp 504 public int compareTo(java.util.Date o) { in compareTo() method in Timestamp 509 return compareTo((Timestamp)o); in compareTo() 514 return this.compareTo(ts); in compareTo()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestMonthDay.java | 128 assertTrue(a.compareTo(b) < 0, a + " <=> " + b); in doTest_comparisons_MonthDay() 133 assertTrue(a.compareTo(b) > 0, a + " <=> " + b); in doTest_comparisons_MonthDay() 138 assertEquals(a.compareTo(b), 0, a + " <=> " + b); in doTest_comparisons_MonthDay()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/cert/ |
D | X509CertificateTest.java | 275 .compareTo(na_date) > 0); in testCheckValidity1() 277 .compareTo(nb_date) < 0); in testCheckValidity1() 280 date.compareTo(na_date) > 0); in testCheckValidity1() 283 date.compareTo(nb_date) < 0); in testCheckValidity1() 323 .compareTo(na_date) > 0); in testCheckValidity2() 325 .compareTo(nb_date) < 0); in testCheckValidity2() 328 date[i].compareTo(na_date) > 0); in testCheckValidity2() 331 + "was thrown", date[i].compareTo(nb_date) < 0); in testCheckValidity2()
|
/libcore/luni/src/test/java/libcore/android/system/ |
D | StructTimespecTest.java | 79 assertTrue(a + "<" + b, specs[a].compareTo(specs[b]) < 0); in testCompare() 81 assertTrue(a + "==" + b, specs[a].compareTo(specs[b]) == 0); in testCompare() 83 assertTrue(a + ">" + b, specs[a].compareTo(specs[b]) > 0); in testCompare()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoLocalDateTime.java | 499 default int compareTo(ChronoLocalDateTime<?> other) { in compareTo() method 500 int cmp = toLocalDate().compareTo(other.toLocalDate()); in compareTo() 502 cmp = toLocalTime().compareTo(other.toLocalTime()); in compareTo() 504 cmp = getChronology().compareTo(other.getChronology()); in compareTo()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Comparable.java | 136 public int compareTo(T o); in compareTo() method
|