/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 | 383 assertEquals(-1, "a".compareTo("b")); in test_compareTo() 384 assertEquals(-2, "a".compareTo("c")); in test_compareTo() 385 assertEquals(1, "b".compareTo("a")); in test_compareTo() 386 assertEquals(2, "c".compareTo("a")); in test_compareTo() 390 assertEquals(0, "a".compareTo("a")); in test_compareTo() 391 assertEquals(-1, "a".compareTo("aa")); in test_compareTo() 392 assertEquals(-1, "a".compareTo("az")); in test_compareTo() 393 assertEquals(-2, "a".compareTo("aaa")); in test_compareTo() 394 assertEquals(-2, "a".compareTo("azz")); in test_compareTo() 395 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/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/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()
|
D | BigIntegerTest.java | 94 assertTrue("Random number is negative", bi.compareTo(zero) >= 0); in test_ConstructorILjava_util_Random() 96 bi.compareTo(twoToTheSeventy) < 0); in test_ConstructorILjava_util_Random() 232 assertTrue("Smaller number returned >= 0", one.compareTo(two) < 0); in test_compareToLjava_math_BigInteger() 233 assertTrue("Larger number returned >= 0", two.compareTo(one) > 0); in test_compareToLjava_math_BigInteger() 234 assertTrue("Equal numbers did not return 0", one.compareTo(one) == 0); in test_compareToLjava_math_BigInteger() 236 two.negate().compareTo(one) < 0); in test_compareToLjava_math_BigInteger() 380 .compareTo(mod) < 0); in test_modInverseLjava_math_BigInteger() 383 .compareTo(BigInteger.ZERO) >= 0); in test_modInverseLjava_math_BigInteger() 401 .compareTo(mod) < 0); in test_modInverseLjava_math_BigInteger() 404 .compareTo(BigInteger.ZERO) >= 0); in test_modInverseLjava_math_BigInteger() [all …]
|
D | BigDecimalCompareTest.java | 99 assertEquals("incorrect result", result, aNumber.compareTo(bNumber)); in testCompareEqualScale1() 113 assertEquals("incorrect result", result, aNumber.compareTo(bNumber)); in testCompareEqualScale2() 127 assertEquals("incorrect result", result, aNumber.compareTo(bNumber)); in testCompareGreaterScale1() 141 assertEquals("incorrect result", result, aNumber.compareTo(bNumber)); in testCompareGreaterScale2() 155 assertEquals("incorrect result", result, aNumber.compareTo(bNumber)); in testCompareLessScale1() 169 assertEquals("incorrect result", result, aNumber.compareTo(bNumber)); in testCompareLessScale2() 509 int result = testInstance.compareTo(new BigDecimal("1.00")); in testApproxPrecision()
|
/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/main/java/java/util/ |
D | ComparableTimSort.java | 228 if (pivot.compareTo(a[mid]) < 0) in binarySort() 286 if (((Comparable) a[runHi++]).compareTo(a[lo]) < 0) { // Descending in countRunAndMakeAscending() 287 while(runHi < hi && ((Comparable) a[runHi]).compareTo(a[runHi - 1]) < 0) in countRunAndMakeAscending() 291 while (runHi < hi && ((Comparable) a[runHi]).compareTo(a[runHi - 1]) >= 0) in countRunAndMakeAscending() 475 if (key.compareTo(a[base + hint]) > 0) { in gallopLeft() 478 while (ofs < maxOfs && key.compareTo(a[base + hint + ofs]) > 0) { in gallopLeft() 493 while (ofs < maxOfs && key.compareTo(a[base + hint - ofs]) <= 0) { in gallopLeft() 518 if (key.compareTo(a[base + m]) > 0) in gallopLeft() 545 if (key.compareTo(a[base + hint]) < 0) { in gallopRight() 548 while (ofs < maxOfs && key.compareTo(a[base + hint - ofs]) < 0) { in gallopRight() [all …]
|
/libcore/dex/src/main/java/com/android/dex/ |
D | Annotation.java | 54 @Override public int compareTo(Annotation other) { in compareTo() method in Annotation 55 return encodedAnnotation.compareTo(other.encodedAnnotation); in compareTo()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetTest.java | 568 assertEquals(0, c1.compareTo(c1)); in testCompareTo_Normal() 571 assertEquals(0, c1.compareTo(c2)); in testCompareTo_Normal() 574 assertTrue(c1.compareTo(c2) < 0); in testCompareTo_Normal() 575 assertTrue(c2.compareTo(c1) > 0); in testCompareTo_Normal() 578 assertTrue(c1.compareTo(c2) > 0); in testCompareTo_Normal() 579 assertTrue(c2.compareTo(c1) < 0); in testCompareTo_Normal() 582 assertTrue(c1.compareTo(c2) > 0); in testCompareTo_Normal() 583 assertTrue(c2.compareTo(c1) < 0); in testCompareTo_Normal() 586 assertEquals("mock".compareToIgnoreCase("m:"), c1.compareTo(c2)); in testCompareTo_Normal() 587 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/main/java/java/sql/ |
D | Timestamp.java | 196 public int compareTo(Date theObject) throws ClassCastException { in compareTo() method in Timestamp 197 return this.compareTo((Timestamp) theObject); in compareTo() 217 public int compareTo(Timestamp theTimestamp) { in compareTo() method in Timestamp 218 int result = super.compareTo(theTimestamp); in compareTo()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | CollationKeyICU.java | 34 @Override public int compareTo(CollationKey other) { in compareTo() method in CollationKeyICU 81 return compareTo((CollationKey) object) == 0; in equals()
|
/libcore/luni/src/main/java/java/lang/ |
D | Comparable.java | 52 int compareTo(T another); in compareTo() method
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/cert/ |
D | X509CertificateTest.java | 274 .compareTo(na_date) > 0); in testCheckValidity1() 276 .compareTo(nb_date) < 0); in testCheckValidity1() 279 date.compareTo(na_date) > 0); in testCheckValidity1() 282 date.compareTo(nb_date) < 0); in testCheckValidity1() 322 .compareTo(na_date) > 0); in testCheckValidity2() 324 .compareTo(nb_date) < 0); in testCheckValidity2() 327 date[i].compareTo(na_date) > 0); in testCheckValidity2() 330 + "was thrown", date[i].compareTo(nb_date) < 0); in testCheckValidity2()
|
/libcore/luni/src/main/java/java/text/ |
D | CollationKey.java | 95 public abstract int compareTo(CollationKey value); in compareTo() method in CollationKey
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | CollationKeyTest.java | 35 assertEquals("Should be equal", 0, key1.compareTo(key2)); in test_compareToLjava_text_CollationKey() 48 assertEquals("Should be equal", 0, key1.compareTo(key2)); in test_compareToLjava_lang_Object()
|
/libcore/luni/src/main/java/java/security/spec/ |
D | EllipticCurve.java | 84 if (this.a.signum() < 0 || this.a.compareTo(p) >= 0) { in EllipticCurve() 87 if (this.b.signum() < 0 || this.b.compareTo(p) >= 0) { in EllipticCurve()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | UUIDTest.java | 193 assertEquals(0, uuid1.compareTo(uuid1)); in test_compareTo() 195 assertEquals(-1, uuid1.compareTo(uuid2)); in test_compareTo() 196 assertEquals(1, uuid2.compareTo(uuid1)); in test_compareTo() 199 assertEquals(-1, uuid1.compareTo(uuid2)); in test_compareTo() 200 assertEquals(1, uuid2.compareTo(uuid1)); in test_compareTo()
|
D | DateTest.java | 169 .compareTo(d1)); in test_compareToLjava_util_Date() 171 .compareTo(d2)); in test_compareToLjava_util_Date() 173 1, d1.compareTo(d4)); in test_compareToLjava_util_Date() 175 -1, d1.compareTo(d3)); in test_compareToLjava_util_Date() 178 d1.compareTo(null); in test_compareToLjava_util_Date()
|