/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringBufferTest.java | 58 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo() 60 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo() 64 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo() 66 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo() 71 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo() 73 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo() 78 assertEquals(0, new StringBuffer().compareTo(sb1)); in testCompareTo() 80 assertEquals(0, new StringBuffer("a").compareTo(sb1)); in testCompareTo()
|
D | StringBuilderTest.java | 168 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo() 170 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo() 174 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo() 176 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo() 181 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo() 183 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo() 188 assertEquals(0, new StringBuilder().compareTo(sb1)); in testCompareTo() 190 assertEquals(0, new StringBuilder("a").compareTo(sb1)); in testCompareTo()
|
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()
|
D | StringTest.java | 542 assertEquals(-1, "a".compareTo("b")); in test_compareTo() 543 assertEquals(-2, "a".compareTo("c")); in test_compareTo() 544 assertEquals(1, "b".compareTo("a")); in test_compareTo() 545 assertEquals(2, "c".compareTo("a")); in test_compareTo() 549 assertEquals(0, "a".compareTo("a")); in test_compareTo() 550 assertEquals(-1, "a".compareTo("aa")); in test_compareTo() 551 assertEquals(-1, "a".compareTo("az")); in test_compareTo() 552 assertEquals(-2, "a".compareTo("aaa")); in test_compareTo() 553 assertEquals(-2, "a".compareTo("azz")); in test_compareTo() 554 assertEquals(-3, "a".compareTo("aaaa")); in test_compareTo() [all …]
|
/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/ojluni/src/test/java/util/UUID/ |
D | UUIDTest.java | 51 compareTo(); in main() 264 private static void compareTo() throws Exception { in compareTo() method in UUIDTest 271 if ((id.compareTo(id2) >= 0) || in compareTo() 272 (id2.compareTo(id3) >= 0) || in compareTo() 273 (id3.compareTo(id4) >= 0) || in compareTo() 274 (id4.compareTo(id5) >= 0)) in compareTo() 277 if ((id5.compareTo(id4) <= 0) || in compareTo() 278 (id4.compareTo(id3) <= 0) || in compareTo() 279 (id3.compareTo(id2) <= 0) || in compareTo() 280 (id2.compareTo(id) <= 0)) in compareTo() [all …]
|
/libcore/ojluni/src/test/java/text/Collator/ |
D | MonkeyTest.java | 90 int result = CollationKey1.compareTo(CollationKey2); // Tertiary in TestCollationKey() 91 int revResult = CollationKey2.compareTo(CollationKey1); // Tertiary in TestCollationKey() 96 result = CollationKey1.compareTo(CollationKey2); // Secondary in TestCollationKey() 97 revResult = CollationKey2.compareTo(CollationKey1); // Secondary in TestCollationKey() 102 result = CollationKey1.compareTo(CollationKey2); // Primary in TestCollationKey() 103 revResult = CollationKey2.compareTo(CollationKey1); // Primary in TestCollationKey() 108 result = CollationKey1.compareTo(CollationKey2); in TestCollationKey() 111 result = CollationKey2.compareTo(CollationKey1); in TestCollationKey()
|
/libcore/ojluni/src/test/java/lang/StringBuilder/ |
D | Comparison.java | 83 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testCompare() 84 Assert.assertFalse(sb1.compareTo(sb3) == 0, "Compare sb1 and sb3"); in testCompare() 97 Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation"); in testModifiedSequence() 106 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testModifiedSequence() 107 …Assert.assertTrue(sb1.toString().compareTo(sb2.toString()) == 0, "Compare strings of sb1 and sb2"); in testModifiedSequence()
|
/libcore/ojluni/src/test/java/lang/StringBuffer/ |
D | Comparison.java | 83 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testCompare() 84 Assert.assertFalse(sb1.compareTo(sb3) == 0, "Compare sb1 and sb3"); in testCompare() 97 Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation"); in testModifiedSequence() 106 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testModifiedSequence() 107 …Assert.assertTrue(sb1.toString().compareTo(sb2.toString()) == 0, "Compare strings of sb1 and sb2"); in testModifiedSequence()
|
/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()
|
/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/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/ojluni/src/test/java/time/tck/java/time/ |
D | TCKOffsetDateTime.java | 1292 assertEquals(a.compareTo(b) < 0, true); 1293 assertEquals(b.compareTo(a) > 0, true); 1294 assertEquals(a.compareTo(a) == 0, true); 1295 assertEquals(b.compareTo(b) == 0, true); 1296 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1304 assertEquals(a.compareTo(b) < 0, true); 1305 assertEquals(b.compareTo(a) > 0, true); 1306 assertEquals(a.compareTo(a) == 0, true); 1307 assertEquals(b.compareTo(b) == 0, true); 1308 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() 513 if (key.compareTo(a[base + hint]) > 0) { in gallopLeft() 516 while (ofs < maxOfs && key.compareTo(a[base + hint + ofs]) > 0) { in gallopLeft() 531 while (ofs < maxOfs && key.compareTo(a[base + hint - ofs]) <= 0) { in gallopLeft() 556 if (key.compareTo(a[base + m]) > 0) in gallopLeft() 583 if (key.compareTo(a[base + hint]) < 0) { in gallopRight() 586 while (ofs < maxOfs && key.compareTo(a[base + hint - ofs]) < 0) { in gallopRight() [all …]
|
/libcore/ojluni/src/test/java/math/BigDecimal/ |
D | SquareRootTests.java | 269 Assert.assertTrue(result.compareTo(TWO) < 0); in almostFourRoundingDown() 291 Assert.assertTrue(result.compareTo(TWO) > 0); 400 int result = a.compareTo(b); 505 ONE_TENTH.compareTo(working) <= 0 && working.compareTo(TEN) < 0; 578 if (bd.subtract(square(result)).compareTo(ZERO) != 0) { 644 square(result).compareTo(input) <= 0 && 645 square(neighborUp).compareTo(input) > 0: 652 square(result).compareTo(input) >= 0 : 656 square(neighborDown).compareTo(input) < 0 : 672 int err_comp_errUp = err.compareTo(errUp); [all …]
|
D | ZeroScalingTests.java | 109 result.compareTo(element) != 0, in addTests() 116 result.compareTo(element) != 0, in addTests() 123 result.compareTo(element.negate()) != 0, in addTests() 130 result.compareTo(element.negate()) != 0, in addTests() 183 result.compareTo(element) != 0, in subtractTests() 190 result.compareTo(element.negate()) != 0, in subtractTests() 197 result.compareTo(element.negate()) != 0, in subtractTests() 204 result.compareTo(element) != 0, in subtractTests()
|
/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/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/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 …]
|
/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/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()
|