/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | StringReaderTest.java | 27 StringReader sr; field in StringReaderTest 43 sr = new StringReader(testString); in test_close() 44 sr.close(); in test_close() 46 sr.read(buf, 0, 2); in test_close() 58 sr = new StringReader(testString); in test_markI() 59 sr.skip(5); in test_markI() 60 sr.mark(0); in test_markI() 61 sr.skip(5); in test_markI() 62 sr.reset(); in test_markI() 64 sr.read(buf, 0, 2); in test_markI() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | SplittableRandomTest.java | 84 SplittableRandom sr = new SplittableRandom(); in testNextInt() local 85 int f = sr.nextInt(); in testNextInt() 87 while (i < NCALLS && sr.nextInt() == f) in testNextInt() 96 SplittableRandom sr = new SplittableRandom(); 97 long f = sr.nextLong(); 99 while (i < NCALLS && sr.nextLong() == f) 108 SplittableRandom sr = new SplittableRandom(); 109 double f = sr.nextDouble(); 111 while (i < NCALLS && sr.nextDouble() == f) 134 SplittableRandom sr = new SplittableRandom(); [all …]
|
/libcore/luni/src/test/java/tests/java/security/ |
D | SecureRandomTest.java | 62 MySecureRandom sr = new MySecureRandom(); in testNext() local 63 if (sr.nextElement(1) != 1 || sr.nextElement(2) != 3 || sr.nextElement(3) != 7) { in testNext() 72 SecureRandom sr = new SecureRandom(); in testSetSeedlong() local 73 sr.setSeed(12345); in testSetSeedlong() 81 SecureRandom sr = new SecureRandom(); in testNextBytes() local 82 sr.nextBytes(b); in testNextBytes() 90 sr.nextBytes(null); in testNextBytes() 101 SecureRandom sr = new SecureRandom(); in testSecureRandom() local 102 if (!sr.getAlgorithm().equals("someRandom") || in testSecureRandom() 103 sr.getProvider()!= p) { in testSecureRandom() [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldStringReaderTest.java | 27 StringReader sr; field in OldStringReaderTest 30 sr = new StringReader(testString); in test_markI() 32 sr.mark(-1); in test_markI() 40 sr = new StringReader(testString); in test_read$CII() 42 sr.read(buf, 0, -1); in test_read$CII() 48 sr.read(buf, -1, 1); in test_read$CII() 54 sr.read(buf, 1, testString.length()); in test_read$CII() 64 sr.close(); in tearDown()
|
/libcore/luni/src/test/java/libcore/java/security/ |
D | SecureRandomTest.java | 73 private void test_SecureRandom(SecureRandom sr) throws Exception { in test_SecureRandom() argument 77 sr.nextBytes(out1); in test_SecureRandom() 78 sr.nextBytes(out2); in test_SecureRandom() 81 byte[] seed1 = sr.generateSeed(20); in test_SecureRandom() 82 byte[] seed2 = sr.generateSeed(20); in test_SecureRandom() 85 sr.setSeed(STATIC_SEED_BYTES); in test_SecureRandom() 86 sr.nextBytes(out1); in test_SecureRandom() 87 sr.nextBytes(out2); in test_SecureRandom() 90 sr.setSeed(STATIC_SEED_LONG); in test_SecureRandom() 91 sr.nextBytes(out1); in test_SecureRandom() [all …]
|
D | ProviderTest.java | 921 SecureRandom sr = new SecureRandom(); in testSecureRandomImplementationOrder() local 922 if (!sr.getAlgorithm().equals("SecureRandom1")) { in testSecureRandomImplementationOrder() 923 throw new IllegalStateException("Expected SecureRandom1 was " + sr.getAlgorithm()); in testSecureRandomImplementationOrder()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/ |
D | OldSHA1PRNGSecureRandomTest.java | 38 private static SecureRandom sr; // fields used by tests field in OldSHA1PRNGSecureRandomTest 47 sr = SecureRandom.getInstance(algorithm); in setUp() 57 sr.generateSeed(-1); in testGenerateSeedint01() 70 byte[] myBytes = sr.generateSeed(i); in testGenerateSeedint02() 87 myBytes1 = sr.generateSeed(i); in testGenerateSeedint03() 88 myBytes2 = sr.generateSeed(i); in testGenerateSeedint03() 105 sr.nextBytes(null); in testNextBytesbyteArray01() 129 sr.setSeed(myBytes); in testNextBytesbyteArray02() 135 sr.nextBytes(myBytes1); in testNextBytesbyteArray02() 155 sr.nextBytes(bytes1[k]); in testNextBytesbyteArray02() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/ |
D | ReferenceQueueTest.java | 50 SoftReference sr = new SoftReference(integer, rq); in run() local 51 sr.enqueue(); in run() 67 SoftReference sr = new SoftReference(b, rq); in test_poll() local 71 sr.enqueue(); in test_poll() 96 sr.enqueue(); in test_poll() 112 SoftReference sr = new SoftReference(b, rq); in test_remove() local 113 sr.enqueue(); in test_remove() 123 sr.enqueue(); in test_remove() 173 SoftReference sr = new SoftReference(b, rq); in test_removeJ() local 179 sr.enqueue(); in test_removeJ()
|
D | ReferenceTest.java | 69 SoftReference sr = new SoftReference(tmpA, new ReferenceQueue()); in test_clear() local 72 assertTrue("Start: Object not cleared.", (sr.get() != null) in test_clear() 75 sr.clear(); in test_clear() 78 assertTrue("End: Object cleared.", (sr.get() == null) in test_clear() 82 assertTrue("should always pass", tmpA != sr.get() && tmpB != wr.get()); in test_clear() 92 final SoftReference sr = new SoftReference(tmpA, new ReferenceQueue()); in test_refersTo() local 95 assertTrue("soft refersTo(referent)", sr.refersTo(tmpA)); in test_refersTo() 98 assertFalse("soft refersTo(other)", sr.refersTo(tmpC)); in test_refersTo() 101 sr.clear(); in test_refersTo() 104 assertTrue("soft refersTo(null)", sr.refersTo(null)); in test_refersTo() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/ |
D | InputSourceTest.java | 73 StringReader sr = new StringReader("Hello, world."); in testInputSourceReader() local 76 InputSource i = new InputSource(sr); in testInputSourceReader() 79 assertEquals(sr, i.getCharacterStream()); in testInputSourceReader() 145 StringReader sr = new StringReader("Hello, world."); in testSetCharacterStreamGetCharacterStream() local 150 i.setCharacterStream(sr); in testSetCharacterStreamGetCharacterStream() 153 assertEquals(sr, i.getCharacterStream()); in testSetCharacterStreamGetCharacterStream()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | SecureRandom2Test.java | 99 MySecureRandom sr = new MySecureRandom(new MySecureRandomSpi(), p); in test_ConstructorLjava_security_SecureRandomSpi_java_security_Provider() local 100 assertEquals("unknown", sr.getAlgorithm()); in test_ConstructorLjava_security_SecureRandomSpi_java_security_Provider() 101 assertEquals(p, sr.getProvider()); in test_ConstructorLjava_security_SecureRandomSpi_java_security_Provider() 103 sr = new MySecureRandom(new MySecureRandomSpi(), null); in test_ConstructorLjava_security_SecureRandomSpi_java_security_Provider() 104 sr = new MySecureRandom(null, p); in test_ConstructorLjava_security_SecureRandomSpi_java_security_Provider() 264 SecureRandom sr = new SecureRandom(spi, null) { in test_getAlgorithm() local 267 assertEquals("unknown", sr.getAlgorithm()); in test_getAlgorithm()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | IntSliceOpTest.java | 143 Collection<Integer> sr = exerciseOps(data, st -> st.skip(s)); in testSkipOps() local 144 assertEquals(sr.size(), sliceSize(data.size(), s)); in testSkipOps() 146 sr = exerciseOps(data, st -> st.skip(s).skip(s / 2)); in testSkipOps() 147 assertEquals(sr.size(), sliceSize(sliceSize(data.size(), s), s / 2)); in testSkipOps() 160 Collection<Integer> sr = exerciseOps(data, st -> st.skip(s).limit(limit)); in testSkipLimitOps() local 161 assertEquals(sr.size(), sliceSize(sliceSize(data.size(), s), 0, limit)); in testSkipLimitOps() 163 sr = exerciseOps(data, st -> st.skip(s).limit(limit)); in testSkipLimitOps() 164 assertEquals(sr.size(), sliceSize(data.size(), s, limit)); in testSkipLimitOps() 175 Collection<Integer> sr = exerciseOps(data, st -> st.limit(limit)); in testLimitOps() local 176 assertEquals(sr.size(), sliceSize(data.size(), 0, limit)); in testLimitOps() [all …]
|
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
D | SSLContextSpiImpl.java | 22 SecureRandom sr) throws KeyManagementException { in engineInit() argument 23 if (sr == null) { in engineInit()
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | OCSPResponse.java | 411 SingleResponse sr = getSingleResponse(certId); in verify() local 412 if (sr == null) { in verify() 422 certId.getSerialNumber() + ") is: " + sr.getCertStatus()); in verify() 600 for (SingleResponse sr : singleResponseMap.values()) { in verify() 603 if (sr.nextUpdate != null) { in verify() 604 until = " until " + sr.nextUpdate; in verify() 607 sr.thisUpdate + until); in verify() 615 if (nowPlusSkew.before(sr.thisUpdate) || in verify() 617 sr.nextUpdate != null ? sr.nextUpdate : sr.thisUpdate)) in verify()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
D | CipherPBEThread.java | 40 SecureRandom sr = new SecureRandom(); in crypt() local 49 sr.nextBytes(salt); in crypt()
|
D | CipherSymmetricKeyThread.java | 38 SecureRandom sr = new SecureRandom(); in crypt() local 53 sr.nextBytes(iv); in crypt()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | AbstractShortCircuitTask.java | 107 AtomicReference<R> sr = sharedResult; in compute() local 109 while ((result = sr.get()) == null) { in compute()
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
D | SSLContextSpi.java | 52 SecureRandom sr) throws KeyManagementException; in engineInit() argument
|
/libcore/ojluni/src/main/java/java/util/ |
D | XMLUtils.java | 178 StreamResult sr = new StreamResult(os); in emitDocument() local 180 t.transform(doms, sr); in emitDocument()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLContextSpiTest.java | 172 SecureRandom sr = getSecureRandom(); in engineInit() local 173 ssl.engineInit(km, tm, sr); in engineInit()
|
/libcore/ojluni/src/main/java/java/security/ |
D | Signature.java | 1389 protected void engineInitSign(PrivateKey privateKey, SecureRandom sr) in engineInitSign() argument 1394 sigSpi.engineInitSign(privateKey, sr); in engineInitSign() 1396 chooseProvider(I_PRIV_SR, privateKey, sr); in engineInitSign()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | KeyGeneratorTest.java | 509 SecureRandom sr = new SecureRandom(); in test_initLjava_security_spec_AlgorithmParameterSpec() local 513 sr.nextBytes(iv); in test_initLjava_security_spec_AlgorithmParameterSpec()
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | StreamReuseTest.java | 48 U sr = second.apply(stream); in assertSecondFails() local 66 U sr = second.apply(stream); in assertSecondFails() local
|
/libcore/ojluni/annotations/hiddenapi/java/security/ |
D | Signature.java | 310 java.security.PrivateKey privateKey, java.security.SecureRandom sr) in engineInitSign() argument
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | PropertiesTest.java | 896 InputStream sr = new ByteArrayInputStream("hello".getBytes()); in testLoadSingleLine() local 897 props.load(sr); in testLoadSingleLine()
|