Home
last modified time | relevance | path

Searched refs:sr (Results 1 – 25 of 30) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DStringReaderTest.java27 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/luni/src/test/java/tests/java/security/
DSecureRandomTest.java62 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/
DOldStringReaderTest.java27 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/
DSecureRandomTest.java73 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 …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/
DOldSHA1PRNGSecureRandomTest.java38 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/
DReferenceQueueTest.java50 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()
DSoftReferenceTest.java41 SoftReference sr = new SoftReference(bool, rq); in test_ConstructorLjava_lang_ObjectLjava_lang_ref_ReferenceQueue() local
42 assertTrue("Initialization failed.", ((Boolean) sr.get()) in test_ConstructorLjava_lang_ObjectLjava_lang_ref_ReferenceQueue()
63 SoftReference sr = new SoftReference(bool); in test_ConstructorLjava_lang_Object() local
64 assertTrue("Initialization failed.", ((Boolean) sr.get()) in test_ConstructorLjava_lang_Object()
76 SoftReference sr = new SoftReference(bool); in test_get() local
77 assertTrue("Same object not returned.", bool == sr.get()); in test_get()
DReferenceTest.java69 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()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/
DInputSourceTest.java73 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/
DSecureRandom2Test.java99 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/
DIntSliceOpTest.java143 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/ojluni/src/main/java/sun/security/provider/certpath/
DOCSPResponse.java411 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/support/src/test/java/org/apache/harmony/xnet/tests/support/
DSSLContextSpiImpl.java22 SecureRandom sr) throws KeyManagementException { in engineInit() argument
23 if (sr == null) { in engineInit()
DMySSLContextSpi.java44 SecureRandom sr) throws KeyManagementException { in engineInit() argument
45 if (sr == null) { in engineInit()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DCipherPBEThread.java40 SecureRandom sr = new SecureRandom(); in crypt() local
49 sr.nextBytes(salt); in crypt()
DCipherSymmetricKeyThread.java38 SecureRandom sr = new SecureRandom(); in crypt() local
53 sr.nextBytes(iv); in crypt()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLContextSpiTest.java169 SecureRandom sr = SecureRandom.getInstance("SHA1PRNG"); in test_engineInit() local
171 ssl.engineInit(km, tm, sr); in test_engineInit()
208 SecureRandom sr = SecureRandom.getInstance("SHA1PRNG"); in test_commonTest_02() local
209 ssl.engineInit(km, tm, sr); in test_commonTest_02()
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DMySSLContextSpi.java46 SecureRandom sr) throws KeyManagementException { in engineInit() argument
47 if (sr == null) { in engineInit()
/libcore/ojluni/src/main/java/java/util/stream/
DAbstractShortCircuitTask.java107 AtomicReference<R> sr = sharedResult; in compute() local
109 while ((result = sr.get()) == null) { in compute()
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLContextSpi.java52 SecureRandom sr) throws KeyManagementException; in engineInit() argument
/libcore/ojluni/src/main/java/java/util/
DXMLUtils.java178 StreamResult sr = new StreamResult(os); in emitDocument() local
180 t.transform(doms, sr); in emitDocument()
DHashMap.java2056 TreeNode<K,V> sr = s.right; in removeTreeNode() local
2074 if ((p.right = sr) != null) in removeTreeNode()
2075 sr.parent = p; in removeTreeNode()
2084 if (sr != null) in removeTreeNode()
2085 replacement = sr; in removeTreeNode()
2296 TreeNode<K,V> sl = xpr.left, sr = xpr.right; in balanceDeletion() local
2297 if ((sr == null || !sr.red) && in balanceDeletion()
2303 if (sr == null || !sr.red) { in balanceDeletion()
2313 if ((sr = xpr.right) != null) in balanceDeletion()
2314 sr.red = false; in balanceDeletion()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DConcurrentHashMap.java3023 TreeNode<K,V> sr = s.right; in removeTreeNode() local
3041 if ((p.right = sr) != null) in removeTreeNode()
3042 sr.parent = p; in removeTreeNode()
3051 if (sr != null) in removeTreeNode()
3052 replacement = sr; in removeTreeNode()
3209 TreeNode<K,V> sl = xpr.left, sr = xpr.right; in balanceDeletion() local
3210 if ((sr == null || !sr.red) && in balanceDeletion()
3216 if (sr == null || !sr.red) { in balanceDeletion()
3226 if ((sr = xpr.right) != null) in balanceDeletion()
3227 sr.red = false; in balanceDeletion()
[all …]
/libcore/ojluni/src/main/java/java/lang/
DStringCoding.java64 SoftReference<T> sr = tl.get(); in deref() local
65 if (sr == null) in deref()
67 return sr.get(); in deref()
/libcore/ojluni/src/main/java/java/security/
DSignature.java1341 protected void engineInitSign(PrivateKey privateKey, SecureRandom sr) in engineInitSign() argument
1344 sigSpi.engineInitSign(privateKey, sr); in engineInitSign()
1346 chooseProvider(I_PRIV_SR, privateKey, sr); in engineInitSign()

12