/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | Arrays2Test.java | 21 import java.util.Arrays; 42 int result = Arrays.binarySearch(specials, specials[i]); in test_binarySearch$DD() 47 -4, Arrays.binarySearch(specials, -1d)); in test_binarySearch$DD() 49 -8, Arrays.binarySearch(specials, 1d)); in test_binarySearch$DD() 62 int result = Arrays.binarySearch(specials, specials[i]); in test_binarySearch$FF() 67 -4, Arrays.binarySearch(specials, -1f)); in test_binarySearch$FF() 69 -8, Arrays.binarySearch(specials, 1f)); in test_binarySearch$FF() 78 Arrays.fill(d, Double.MAX_VALUE); in test_equals$D$D() 79 Arrays.fill(x, Double.MIN_VALUE); in test_equals$D$D() 81 assertTrue("Assert 0: Inequal arrays returned true", !Arrays.equals(d, x)); in test_equals$D$D() [all …]
|
D | ArraysTest.java | 21 import java.util.Arrays; 74 List convertedList = Arrays.asList(objectArray); in test_asList$Ljava_lang_Object() 89 convertedList = Arrays.asList(myArray); in test_asList$Ljava_lang_Object() 97 Arrays.asList((Object[]) null); in test_asList$Ljava_lang_Object() 111 Arrays.binarySearch(byteArray, counter) == counter); in test_binarySearch$BB() 113 -1, Arrays.binarySearch(intArray, (byte) -1)); in test_binarySearch$BB() 116 Arrays.binarySearch(intArray, (byte) arraySize) == -(arraySize + 1)); in test_binarySearch$BB() 122 Arrays.binarySearch(byteArray, (byte) (counter - 50)) == counter); in test_binarySearch$BB() 133 Arrays.binarySearch(charArray, (char) (counter + 1)) == counter); in test_binarySearch$CC() 135 -1, Arrays.binarySearch(charArray, '\u0000')); in test_binarySearch$CC() [all …]
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | ProxySelectorTest.java | 24 import java.util.Arrays; 66 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(ftpUri)); in testNoProxySystemProperty() 67 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(httpUri)); in testNoProxySystemProperty() 68 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(httpsUri)); in testNoProxySystemProperty() 69 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(socketUri)); in testNoProxySystemProperty() 70 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(otherUri)); in testNoProxySystemProperty() 79 assertEquals(Arrays.asList(new Proxy(Proxy.Type.HTTP, createUnresolved("a", 80))), in testProxyHostOnly() 81 assertEquals(Arrays.asList(new Proxy(Proxy.Type.HTTP, createUnresolved("b", 80))), in testProxyHostOnly() 83 assertEquals(Arrays.asList(new Proxy(Proxy.Type.HTTP, createUnresolved("c", 443))), in testProxyHostOnly() 85 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(otherUri)); in testProxyHostOnly() [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/security/x509/ |
D | Extension.java | 27 import java.util.Arrays; 204 return Arrays.equals(extnID, extension.extnID) in equals() 206 && Arrays.equals(extnValue, extension.extnValue); in equals() 210 … return (Arrays.hashCode(extnID) * 37 + (critical ? 1 : 0)) * 37 + Arrays.hashCode(extnValue); in hashCode() 252 if (Arrays.equals(extnID, SUBJ_KEY_ID)) { in decodeExtensionValue() 254 } else if (Arrays.equals(extnID, KEY_USAGE)) { in decodeExtensionValue() 256 } else if (Arrays.equals(extnID, SUBJECT_ALT_NAME)) { in decodeExtensionValue() 259 } else if (Arrays.equals(extnID, ISSUER_ALTERNATIVE_NAME)) { in decodeExtensionValue() 262 } else if (Arrays.equals(extnID, BASIC_CONSTRAINTS)) { in decodeExtensionValue() 264 } else if (Arrays.equals(extnID, NAME_CONSTRAINTS)) { in decodeExtensionValue() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | CopyOnWriteArrayListTest.java | 19 import java.util.Arrays; 37 list.addAll(Arrays.asList("a", "b", "c", "d", "e")); in testIteratorAndNonStructuralChanges() 54 list.addAll(Arrays.asList("a", "b", "c", "d", "e")); in testSubListAndNonStructuralChanges() 66 list.addAll(Arrays.asList("a", "b", "c", "d", "e")); in testSubListAndStructuralChanges() 78 list.addAll(Arrays.asList("a", "b", "c", "d", "e")); in testSubListAndSizePreservingStructuralChanges() 81 list.addAll(Arrays.asList("A", "B", "C", "D", "E")); in testSubListAndSizePreservingStructuralChanges() 91 list.addAll(Arrays.asList("a", "b", "c", "d", "e")); in testRemoveAll() 93 list.removeAll(Arrays.asList()); in testRemoveAll() 94 assertEquals(Arrays.asList("a", "b", "c", "d", "e"), list); in testRemoveAll() 96 list.removeAll(Arrays.asList("e")); in testRemoveAll() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | GenericExceptionsTest.java | 24 import java.util.Arrays; 32 assertEquals(Arrays.<Type>asList(IOException.class), in testGenericExceptionsOfMethodsWithTypeParameters() 33 Arrays.asList(method.getGenericExceptionTypes())); in testGenericExceptionsOfMethodsWithTypeParameters() 38 assertEquals(Arrays.<Type>asList(IOException.class), in testGenericExceptionsOfMethodsWithGenericParameters() 39 Arrays.asList(method.getGenericExceptionTypes())); in testGenericExceptionsOfMethodsWithGenericParameters() 44 assertEquals(Arrays.<Type>asList(IOException.class), in testGenericExceptionsOfConstructorsWithTypeParameters() 45 Arrays.asList(constructor.getGenericExceptionTypes())); in testGenericExceptionsOfConstructorsWithTypeParameters() 50 assertEquals(Arrays.<Type>asList(IOException.class), in testGenericExceptionsOfConstructorsWithGenericParameters() 51 Arrays.asList(constructor.getGenericExceptionTypes())); in testGenericExceptionsOfConstructorsWithGenericParameters() 59 assertEquals(Arrays.<Type>asList(Throwable.class), Arrays.asList(typeVariable.getBounds())); in testConstructorThrowingTypeVariable() [all …]
|
/libcore/luni/src/main/java/java/util/ |
D | Objects.java | 19 import java.util.Arrays; 49 return Arrays.deepEquals((Object[]) a, (Object[]) b); in deepEquals() 51 return Arrays.equals((boolean[]) a, (boolean[]) b); in deepEquals() 53 return Arrays.equals((byte[]) a, (byte[]) b); in deepEquals() 55 return Arrays.equals((char[]) a, (char[]) b); in deepEquals() 57 return Arrays.equals((double[]) a, (double[]) b); in deepEquals() 59 return Arrays.equals((float[]) a, (float[]) b); in deepEquals() 61 return Arrays.equals((int[]) a, (int[]) b); in deepEquals() 63 return Arrays.equals((long[]) a, (long[]) b); in deepEquals() 65 return Arrays.equals((short[]) a, (short[]) b); in deepEquals() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
D | GCMParameterSpecTest.java | 19 import java.util.Arrays; 80 assertEquals(Arrays.toString(TEST_IV), Arrays.toString(actual)); in testGetIV_Success() 88 Arrays.equals(spec.getIV(), actual)); in testGetIV_Success() 89 assertEquals(Arrays.toString(TEST_IV), Arrays.toString(spec.getIV())); in testGetIV_Success() 94 assertEquals(Arrays.toString(Arrays.copyOfRange(TEST_IV, 2, 6)), in testGetIV_Subarray_Success() 95 Arrays.toString(spec.getIV())); in testGetIV_Subarray_Success()
|
/libcore/luni/src/main/java/libcore/util/ |
D | Objects.java | 21 import java.util.Arrays; 64 sb.append(Arrays.toString((boolean[]) value)); in toString() 66 sb.append(Arrays.toString((byte[]) value)); in toString() 68 sb.append(Arrays.toString((char[]) value)); in toString() 70 sb.append(Arrays.toString((double[]) value)); in toString() 72 sb.append(Arrays.toString((float[]) value)); in toString() 74 sb.append(Arrays.toString((int[]) value)); in toString() 76 sb.append(Arrays.toString((long[]) value)); in toString() 78 sb.append(Arrays.toString((short[]) value)); in toString() 80 sb.append(Arrays.toString((Object[]) value)); in toString()
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
D | SSLParametersTest.java | 19 import java.util.Arrays; 38 assertEquals(Arrays.asList(cipherSuites), Arrays.asList(p.getCipherSuites())); in test_SSLParameters_cipherSuitesConstructor() 52 assertEquals(Arrays.asList(cipherSuites), Arrays.asList(p.getCipherSuites())); in test_SSLParameters_cpherSuitesProtocolsConstructor() 53 assertEquals(Arrays.asList(protocols), Arrays.asList(p.getProtocols())); in test_SSLParameters_cpherSuitesProtocolsConstructor() 67 assertEquals(Arrays.asList(cipherSuites), Arrays.asList(p.getCipherSuites())); in test_SSLParameters_CipherSuites() 82 assertEquals(Arrays.asList(protocols), Arrays.asList(p.getProtocols())); in test_SSLParameters_Protocols()
|
D | SSLServerSocketTest.java | 22 import java.util.Arrays; 36 assertEquals(Arrays.asList(cipherSuites), Arrays.asList(socket.getEnabledCipherSuites())); in testSetEnabledCipherSuitesAffectsGetter() 54 assertEquals(Arrays.asList(protocols), Arrays.asList(socket.getEnabledProtocols())); in testSetEnabledProtocolsAffectsGetter()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringTest.java | 29 import java.util.Arrays; 128 assertEquals("[97, 63, 98]", Arrays.toString("a\u0666b".getBytes("US-ASCII"))); in test_getBytes_bad() 129 … assertEquals("[97, 63, 98]", Arrays.toString("a\u0666b".getBytes(Charset.forName("US-ASCII")))); in test_getBytes_bad() 137 assertEquals("[]", Arrays.toString("".getBytes(cs))); in test_getBytes_UTF_8() 140 assertEquals("[0]", Arrays.toString("\u0000".getBytes(cs))); in test_getBytes_UTF_8() 141 assertEquals("[127]", Arrays.toString("\u007f".getBytes(cs))); in test_getBytes_UTF_8() 142 assertEquals("[104, 105]", Arrays.toString("hi".getBytes(cs))); in test_getBytes_UTF_8() 145 assertEquals("[-62, -128]", Arrays.toString("\u0080".getBytes(cs))); in test_getBytes_UTF_8() 146 assertEquals("[-39, -90]", Arrays.toString("\u0666".getBytes(cs))); in test_getBytes_UTF_8() 147 assertEquals("[-33, -65]", Arrays.toString("\u07ff".getBytes(cs))); in test_getBytes_UTF_8() [all …]
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | AnnotationMember.java | 28 import java.util.Arrays; 224 return Arrays.equals((Object[])value, (Object[])otherValue); in equalArrayValue() 231 return Arrays.equals((int[])value, (int[])otherValue); in equalArrayValue() 233 return Arrays.equals((byte[])value, (byte[])otherValue); in equalArrayValue() 235 return Arrays.equals((short[])value, (short[])otherValue); in equalArrayValue() 237 return Arrays.equals((long[])value, (long[])otherValue); in equalArrayValue() 239 return Arrays.equals((char[])value, (char[])otherValue); in equalArrayValue() 241 return Arrays.equals((boolean[])value, (boolean[])otherValue); in equalArrayValue() 243 return Arrays.equals((float[])value, (float[])otherValue); in equalArrayValue() 245 return Arrays.equals((double[])value, (double[])otherValue); in equalArrayValue() [all …]
|
D | WildcardTypeImpl.java | 22 import java.util.Arrays; 49 return Arrays.equals(getLowerBounds(), that.getLowerBounds()) && in equals() 50 Arrays.equals(getUpperBounds(), that.getUpperBounds()); in equals() 55 return 31 * Arrays.hashCode(getLowerBounds()) + in hashCode() 56 Arrays.hashCode(getUpperBounds()); in hashCode()
|
/libcore/luni/src/main/java/java/text/ |
D | DateFormatSymbols.java | 24 import java.util.Arrays; 197 Arrays.equals(ampms, rhs.ampms) && in equals() 198 Arrays.equals(eras, rhs.eras) && in equals() 199 Arrays.equals(months, rhs.months) && in equals() 200 Arrays.equals(shortMonths, rhs.shortMonths) && in equals() 201 Arrays.equals(shortWeekdays, rhs.shortWeekdays) && in equals() 202 Arrays.equals(weekdays, rhs.weekdays) && in equals() 213 return Arrays.deepEquals(lhs.internalZoneStrings(), rhs.internalZoneStrings()); in timeZoneStringsEqual() 221 "[amPmStrings=" + Arrays.toString(ampms) + in toString() 222 ",eras=" + Arrays.toString(eras) + in toString() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | NullCipherTest.java | 26 import java.util.Arrays; 61 assertTrue("Incorrect IV", Arrays.equals(c.getIV(), new byte[8])); in testGetIV() 104 assertTrue("different content", Arrays.equals(b, r)); in testUpdatebyteArray() 114 assertTrue("different content", Arrays.equals(b, r)); in testUpdatebyteArrayintint() 130 assertTrue("different content", Arrays.equals(b, r)); in testUpdatebyteArrayintintbyteArray() 140 assertTrue("different content", Arrays.equals(b, r)); in testUpdatebyteArrayintintbyteArrayint() 166 assertTrue("different content", Arrays.equals(b, r)); in testDoFinalbyteArray() 177 assertTrue("different content", Arrays.equals(b, r)); in testDoFinalbyteArrayintint() 205 assertTrue("different content", Arrays.equals(b, r)); in testDoFinalbyteArrayintintbyteArray() 240 assertTrue("different content", Arrays.equals(b, r)); in testDoFinalbyteArrayintintbyteArrayint()
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | ZipOutputStreamTest.java | 25 import java.util.Arrays; 36 … assertEquals(Arrays.toString(data), Arrays.toString(ZipInputStreamTest.unzip("short", zipped))); in testShortMessage() 43 assertEquals(Arrays.toString(data), Arrays.toString(ZipInputStreamTest.unzip("z", zipped))); in test3181430() 49 assertTrue(Arrays.equals(data, ZipInputStreamTest.unzip("r", zip("r", data)))); in testLongMessage()
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | PolicyQualifierInfoTest.java | 28 import java.util.Arrays; 131 assertTrue(Arrays.equals(encoding, encodingRet)); in testPolicyQualifierInfo04() 138 assertTrue(Arrays.equals(encoding, encodingRet1)); in testPolicyQualifierInfo04() 156 assertTrue(Arrays.equals(encoding, encodingRet)); in testGetEncoded01() 179 assertTrue(Arrays.equals(encoding, encodingRet1)); in testGetEncoded02() 200 assertTrue(Arrays.equals(pqEncoding, pqEncodingRet)); in testGetPolicyQualifier01() 227 assertTrue(Arrays.equals(pqEncoding, pqEncodingRet1)); in testGetPolicyQualifier02()
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
D | CipherInputStreamTest.java | 25 import java.util.Arrays; 114 assertEquals(Arrays.toString(plainText.substring(3).getBytes("UTF-8")), in testDecrypt_NullInput_Discarded() 115 Arrays.toString(bytes)); in testDecrypt_NullInput_Discarded() 124 assertEquals(Arrays.toString(aesCipherText), Arrays.toString(bytes)); in testEncrypt() 136 assertEquals(Arrays.toString(rc4CipherText), Arrays.toString(bytes)); in testEncrypt_RC4() 147 assertEquals(Arrays.toString(plainText.getBytes("UTF-8")), Arrays.toString(bytes)); in testDecrypt() 155 assertEquals(Arrays.toString(plainText.getBytes("UTF-8")), Arrays.toString(bytes)); in testDecrypt_RC4()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | DigestOutputStreamTest.java | 31 import java.util.Arrays; 154 assertTrue("write", Arrays.equals(MDGoldenData.getMessage(), bos.toByteArray())); in testWriteint01() 156 assertTrue("update", Arrays.equals(dos.getMessageDigest().digest(), in testWriteint01() 191 assertTrue("write", Arrays.equals(MDGoldenData.getMessage(), bos.toByteArray())); in testWriteint02() 193 assertTrue("update", Arrays.equals(dos.getMessageDigest().digest(), in testWriteint02() 273 assertTrue(Arrays.equals(MDGoldenData.getMessage(), bos.toByteArray())); in testWriteint05() 294 assertTrue("write", Arrays.equals(myMessage, bos.toByteArray())); in test_write$BII_1() 296 assertTrue("update", Arrays.equals(dos.getMessageDigest().digest(), in test_write$BII_1() 328 assertTrue("write", Arrays.equals(myMessage, bos.toByteArray())); in test_write$BII_2() 330 assertTrue("update", Arrays.equals(dos.getMessageDigest().digest(), in test_write$BII_2() [all …]
|
/libcore/luni/src/test/java/libcore/icu/ |
D | ICUTest.java | 21 import java.util.Arrays; 92 assertEquals("[d, M, y]", Arrays.toString(ICU.getDateFormatOrder(best(lv, "yyyy-M-dd")))); in test_getDateFormatOrder() 93 assertEquals("[y, d, M]", Arrays.toString(ICU.getDateFormatOrder(best(lv, "yyyy-MMM-dd")))); in test_getDateFormatOrder() 94 assertEquals("[d, M, \u0000]", Arrays.toString(ICU.getDateFormatOrder(best(lv, "MMM-dd")))); in test_getDateFormatOrder() 96 assertEquals("[y, M, d]", Arrays.toString(ICU.getDateFormatOrder(best(fa, "yyyy-M-dd")))); in test_getDateFormatOrder() 97 assertEquals("[d, M, y]", Arrays.toString(ICU.getDateFormatOrder(best(fa, "yyyy-MMM-dd")))); in test_getDateFormatOrder() 98 assertEquals("[d, M, \u0000]", Arrays.toString(ICU.getDateFormatOrder(best(fa, "MMM-dd")))); in test_getDateFormatOrder() 102 assertEquals("[M, d, y]", Arrays.toString(ICU.getDateFormatOrder(best(en_US, "yyyy-M-dd")))); in test_getDateFormatOrder() 103 assertEquals("[M, d, y]", Arrays.toString(ICU.getDateFormatOrder(best(en_US, "yyyy-MMM-dd")))); in test_getDateFormatOrder() 104 assertEquals("[M, d, \u0000]", Arrays.toString(ICU.getDateFormatOrder(best(en_US, "MMM-dd")))); in test_getDateFormatOrder() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | CopyOnWriteArraySetTest.java | 13 import java.util.Arrays; 59 CopyOnWriteArraySet a = new CopyOnWriteArraySet(Arrays.asList(ints)); in testConstructor3() 183 Collections.shuffle(Arrays.asList(elements)); in testIterator() 262 assertTrue(Arrays.equals(new Object[0], a)); in testToArray() 268 Collections.shuffle(Arrays.asList(elements)); in testToArray() 271 assertTrue(Arrays.equals(elements, full.toArray())); in testToArray() 287 Arrays.fill(a, 42); in testToArray2() 296 Collections.shuffle(Arrays.asList(elements)); in testToArray2() 299 Arrays.fill(a, 42); in testToArray2() 300 assertTrue(Arrays.equals(elements, full.toArray(a))); in testToArray2() [all …]
|
/libcore/luni/src/test/java/tests/security/spec/ |
D | PKCS8EncodedKeySpecTest.java | 29 import java.util.Arrays; 71 assertTrue(Arrays.equals(encodedKey, ek)); in testGetEncoded() 107 assertTrue(Arrays.equals(encodedKey, ek)); in testIsStatePreserved1() 133 assertTrue(Arrays.equals(encodedKey, ek1)); in testIsStatePreserved2()
|
D | X509EncodedKeySpecTest.java | 30 import java.util.Arrays; 72 assertTrue(Arrays.equals(encodedKey, ek)); in testGetEncoded() 108 assertTrue(Arrays.equals(encodedKey, ek)); in testIsStatePreserved1() 134 assertTrue(Arrays.equals(encodedKey, ek1)); in testIsStatePreserved2()
|
/libcore/luni/src/test/java/libcore/util/ |
D | CollectionUtilsTest.java | 22 import java.util.Arrays; 39 assertEquals(Arrays.<String>asList("a", "b", "c", "d", "e"), toList(strings)); in testDereferenceIterable() 42 assertEquals(Arrays.<String>asList("a", "c", "d", "e"), toList(strings)); in testDereferenceIterable() 64 assertEquals(Arrays.<String>asList(), toList(strings)); in testDereferenceIterable() 82 List<String> list = Arrays.asList("A"); in testRemoveDuplicatesOnSingletonCollection() 97 assertEquals(Arrays.asList("A", "B", "C"), list); in testRemoveDuplicates()
|