Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 283) sorted by relevance

12345678910>>...12

/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLSessionTest.java28 TestSSLSessions s = TestSSLSessions.create(); in test_SSLSocket_TestSSLSessions_create() local
29 assertNotNull(s.invalid); in test_SSLSocket_TestSSLSessions_create()
30 assertFalse(s.invalid.isValid()); in test_SSLSocket_TestSSLSessions_create()
31 assertTrue(s.server.isValid()); in test_SSLSocket_TestSSLSessions_create()
32 assertTrue(s.client.isValid()); in test_SSLSocket_TestSSLSessions_create()
33 s.close(); in test_SSLSocket_TestSSLSessions_create()
37 TestSSLSessions s = TestSSLSessions.create(); in test_SSLSession_getApplicationBufferSize() local
38 assertTrue(s.invalid.getApplicationBufferSize() > 0); in test_SSLSession_getApplicationBufferSize()
39 assertTrue(s.server.getApplicationBufferSize() > 0); in test_SSLSession_getApplicationBufferSize()
40 assertTrue(s.client.getApplicationBufferSize() > 0); in test_SSLSession_getApplicationBufferSize()
[all …]
/libcore/luni/src/test/java/tests/api/java/util/
DStackTest.java25 Stack s; field in StackTest
32 assertEquals("Stack creation failed", 0, s.size()); in test_Constructor()
40 assertTrue("New stack answers non-empty", s.empty()); in test_empty()
41 s.push("blah"); in test_empty()
42 assertTrue("Stack should not be empty but answers empty", !s.empty()); in test_empty()
43 s.pop(); in test_empty()
44 assertTrue("Stack should be empty but answers non-empty", s.empty()); in test_empty()
45 s.push(null); in test_empty()
46 assertTrue("Stack with null should not be empty but answers empty", !s in test_empty()
58 s.push(item1); in test_peek()
[all …]
/libcore/luni/src/main/java/java/lang/
DStringToReal.java28 String s; field in StringToReal.StringExponentPair
51 private static native double parseDblImpl(String s, int e); in parseDblImpl() argument
60 private static native float parseFltImpl(String s, int e); in parseFltImpl() argument
62 private static NumberFormatException invalidReal(String s, boolean isDouble) { in invalidReal() argument
63 … throw new NumberFormatException("Invalid " + (isDouble ? "double" : "float") + ": \"" + s + "\""); in invalidReal()
73 private static StringExponentPair initialParse(String s, int length, boolean isDouble) { in initialParse() argument
76 throw invalidReal(s, isDouble); in initialParse()
78 result.negative = (s.charAt(0) == '-'); in initialParse()
82 char c = s.charAt(length - 1); in initialParse()
86 throw invalidReal(s, isDouble); in initialParse()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DOldScannerTest.java34 private Scanner s; field in OldScannerTest
39 s = new Scanner("123test"); in test_findWithinHorizon_Ljava_lang_StringI()
40 String result = s.findWithinHorizon("\\p{Lower}", 5); in test_findWithinHorizon_Ljava_lang_StringI()
42 MatchResult mresult = s.match(); in test_findWithinHorizon_Ljava_lang_StringI()
46 s = new Scanner("12345test1234test next"); in test_findWithinHorizon_Ljava_lang_StringI()
51 result = s.findWithinHorizon("\\p{Digit}+", 2); in test_findWithinHorizon_Ljava_lang_StringI()
53 mresult = s.match(); in test_findWithinHorizon_Ljava_lang_StringI()
58 result = s.findWithinHorizon("\\p{Digit}+", 6); in test_findWithinHorizon_Ljava_lang_StringI()
61 mresult = s.match(); in test_findWithinHorizon_Ljava_lang_StringI()
68 result = s.findWithinHorizon("\\p{Digit}+", 3); in test_findWithinHorizon_Ljava_lang_StringI()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSignatureTest.java60 MySignature1 s = new MySignature1(algorithms[i]); in testConstructor() local
61 assertEquals(algorithms[i],s.getAlgorithm()); in testConstructor()
62 assertNull(s.getProvider()); in testConstructor()
63 assertEquals(0, s.getState()); in testConstructor()
81 MySignature1 s = new MySignature1("ABC"); in testClone() local
83 s.clone(); in testClone()
98 MySignature1 s = new MySignature1("ABC"); in testGetProvider() local
100 assertEquals("state", MySignature1.UNINITIALIZED, s.getState()); in testGetProvider()
101 assertNull("provider", s.getProvider()); in testGetProvider()
105 MySignature1 s = new MySignature1("ABC"); in testGetAlgorithm() local
[all …]
DProviderTest.java162 Set s = p.entrySet(); in testEntrySet() local
164 s.clear(); in testEntrySet()
169 assertEquals("Incorrect set size", 8, s.size()); in testEntrySet()
171 for (Iterator it = s.iterator(); it.hasNext();) { in testEntrySet()
209 Set<Object> s = p.keySet(); in testKeySet() local
211 s.clear(); in testKeySet()
216 assertNotSame(s, s1); in testKeySet()
269 Provider.Service s = (Provider.Service)it.next(); in testPutObjectObject() local
270 if ("Type".equals(s.getType()) && in testPutObjectObject()
271 "Algorithm".equals(s.getAlgorithm()) && in testPutObjectObject()
[all …]
DSignerTest.java78 Signer s = new SignerStub(); in testSigner() local
79 assertNotNull(s); in testSigner()
81 assertNull(s.getPrivateKey()); in testSigner()
88 Signer s = new SignerStub("sss3"); in testSignerString() local
89 assertNotNull(s); in testSignerString()
90 assertEquals("sss3", s.getName()); in testSignerString()
91 assertNull(s.getPrivateKey()); in testSignerString()
102 Signer s = new SignerStub("sss4", IdentityScope.getSystemScope()); in testSignerStringIdentityScope() local
103 assertNotNull(s); in testSignerStringIdentityScope()
104 assertEquals("sss4", s.getName()); in testSignerStringIdentityScope()
[all …]
/libcore/luni/src/test/java/libcore/java/math/
DOldBigIntegerToStringTest.java31 String s = "0000000000"; in test_toString1() local
32 BigInteger bi = new BigInteger(s); in test_toString1()
34 assertEquals("toString method returns incorrect value instead of " + s, sBI, "0"); in test_toString1()
38 String s = "1234567890987654321"; in test_toString2() local
39 BigInteger bi = new BigInteger(s); in test_toString2()
41 assertEquals("toString method returns incorrect value instead of " + s, sBI, s); in test_toString2()
45 String s = "-1234567890987654321"; in test_toString3() local
46 BigInteger bi = new BigInteger(s); in test_toString3()
48 assertEquals("toString method returns incorrect value instead of " + s, sBI, s); in test_toString3()
52 String s = "12345678901234"; in test_toString4() local
[all …]
DOldBigIntegerConstructorsTest.java33 String s = "0"; in test_ConstrString1() local
34 BigInteger bi_s = new BigInteger(s); in test_ConstrString1()
36 assertEquals("the BigInteger value is not initialized properly", bi_s.toString(), s); in test_ConstrString1()
43 String s = "-2147483648"; in test_ConstrString2() local
44 BigInteger bi_s = new BigInteger(s); in test_ConstrString2()
47 assertEquals("the BigInteger value is not initialized properly", bi_s.toString(), s); in test_ConstrString2()
54 String s = "2147483647"; in test_ConstrString3() local
55 BigInteger bi_s = new BigInteger(s); in test_ConstrString3()
58 assertEquals("the BigInteger value is not initialized properly", bi_s.toString(), s); in test_ConstrString3()
/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/
DPatternSyntaxExceptionTest.java32 String s = e.getMessage(); in testPatternSyntaxException() local
33 assertTrue(s.contains("Foo")); in testPatternSyntaxException()
34 assertTrue(s.contains("Bar")); in testPatternSyntaxException()
35 assertTrue(s.contains("0")); in testPatternSyntaxException()
43 s = e.getMessage(); in testPatternSyntaxException()
44 assertFalse(s.contains("Foo")); in testPatternSyntaxException()
45 assertTrue(s.contains("Bar")); in testPatternSyntaxException()
46 assertTrue(s.contains("0")); in testPatternSyntaxException()
54 s = e.getMessage(); in testPatternSyntaxException()
55 assertTrue(s.contains("Foo")); in testPatternSyntaxException()
[all …]
DReplaceTest.java40 String target, pattern, repl, s; in testCaptureReplace() local
50 s = m.replaceFirst(repl); in testCaptureReplace()
51 assertEquals("foo[31];bar[42];[99]xyz", s); in testCaptureReplace()
52 s = m.replaceAll(repl); in testCaptureReplace()
53 assertEquals("foo[31];bar[42];xyz[99]", s); in testCaptureReplace()
60 s = m.replaceFirst(repl); in testCaptureReplace()
62 assertEquals("[63]zoo(42)bar{31}foo;[12]abc(34)def{56}ghi;{99}xyz[88]xyz(77)xyz;", s in testCaptureReplace()
64 s = m.replaceAll(repl); in testCaptureReplace()
66 assertEquals("[63]zoo(42)bar{31}foo;[56]ghi(34)def{12}abc;{99}xyz[88]xyz(77)xyz;", s in testCaptureReplace()
71 String target, pattern, repl, s; in testEscapeReplace() local
[all …]
/libcore/luni/src/main/java/libcore/net/
DUriCodec.java73 public static void validateSimple(String s, String legal) in validateSimple() argument
75 for (int i = 0; i < s.length(); i++) { in validateSimple()
76 char ch = s.charAt(i); in validateSimple()
81 throw new URISyntaxException(s, "Illegal character", i); in validateSimple()
94 private void appendEncoded(StringBuilder builder, String s, Charset charset, in appendEncoded() argument
96 if (s == null) { in appendEncoded()
101 for (int i = 0; i < s.length(); i++) { in appendEncoded()
102 char c = s.charAt(i); in appendEncoded()
109 appendHex(builder, s.substring(escapeStart, i), charset); in appendEncoded()
114 builder.append(s, i, i + 3); in appendEncoded()
[all …]
/libcore/luni/src/test/java/libcore/java/net/
DConcurrentCloseTest.java45 Socket s = ss.accept(); in test_accept() local
46 fail("accept returned " + s + "!"); in test_accept()
54 Socket s = new Socket(); in test_connect() local
55 new Killer(s).start(); in test_connect()
58 s.connect(ss.getLocalSocketAddress()); in test_connect()
59 fail("connect returned: " + s + "!"); in test_connect()
69 Socket s = new Socket(); in test_connect_timeout() local
70 new Killer(s).start(); in test_connect_timeout()
73 s.connect(ss.getLocalSocketAddress(), 3600 * 1000); in test_connect_timeout()
74 fail("connect returned: " + s + "!"); in test_connect_timeout()
[all …]
/libcore/luni/src/main/java/java/util/
DArrayList.java112 int s = size; in add() local
113 if (s == a.length) { in add()
114 Object[] newArray = new Object[s + in add()
115 (s < (MIN_CAPACITY_INCREMENT / 2) ? in add()
116 MIN_CAPACITY_INCREMENT : s >> 1)]; in add()
117 System.arraycopy(a, 0, newArray, 0, s); in add()
120 a[s] = object; in add()
121 size = s + 1; in add()
141 int s = size; in add() local
142 if (index > s || index < 0) { in add()
[all …]
DMissingFormatWidthException.java28 private final String s; field in MissingFormatWidthException
37 public MissingFormatWidthException(String s) { in MissingFormatWidthException() argument
38 if (s == null) { in MissingFormatWidthException()
41 this.s = s; in MissingFormatWidthException()
50 return s; in getFormatSpecifier()
55 return s; in getMessage()
DMissingFormatArgumentException.java29 private final String s; field in MissingFormatArgumentException
38 public MissingFormatArgumentException(String s) { in MissingFormatArgumentException() argument
39 if (s == null) { in MissingFormatArgumentException()
42 this.s = s; in MissingFormatArgumentException()
51 return s; in getFormatSpecifier()
56 return "Format specifier: " + s; in getMessage()
DUnknownFormatConversionException.java27 private final String s; field in UnknownFormatConversionException
36 public UnknownFormatConversionException(String s) { in UnknownFormatConversionException() argument
37 if (s == null) { in UnknownFormatConversionException()
40 this.s = s; in UnknownFormatConversionException()
49 return s; in getConversion()
54 return "Conversion: " + s; in getMessage()
/libcore/luni/src/main/java/libcore/icu/
DNativeIDN.java20 public static String toASCII(String s, int flags) { in toASCII() argument
21 return convert(s, flags, true); in toASCII()
24 public static String toUnicode(String s, int flags) { in toUnicode() argument
26 return convert(s, flags, false); in toUnicode()
31 return s; in toUnicode()
35 private static String convert(String s, int flags, boolean toAscii) { in convert() argument
36 if (s == null) { in convert()
39 return convertImpl(s, flags, toAscii); in convert()
41 private static native String convertImpl(String s, int flags, boolean toAscii); in convertImpl() argument
/libcore/luni/src/main/java/java/util/concurrent/
DPhaser.java286 private static int unarrivedOf(long s) { in unarrivedOf() argument
287 int counts = (int)s; in unarrivedOf()
291 private static int partiesOf(long s) { in partiesOf() argument
292 return (int)s >>> PARTIES_SHIFT; in partiesOf()
295 private static int phaseOf(long s) { in phaseOf() argument
296 return (int)(s >>> PHASE_SHIFT); in phaseOf()
299 private static int arrivedOf(long s) { in arrivedOf() argument
300 int counts = (int)s; in arrivedOf()
331 private String badArrive(long s) { in badArrive() argument
333 stateToString(s); in badArrive()
[all …]
DLinkedTransferQueue.java579 Node s = null; // the node to append, if needed in xfer() local
610 if (s == null) in xfer()
611 s = new Node(e, haveData); in xfer()
612 Node pred = tryAppend(s, haveData); in xfer()
616 return awaitMatch(s, pred, e, (how == TIMED), nanos); in xfer()
631 private Node tryAppend(Node s, boolean haveData) { in tryAppend() argument
635 if (casHead(null, s)) in tryAppend()
636 return s; // initialize in tryAppend()
643 else if (!p.casNext(null, s)) in tryAppend()
647 while ((tail != t || !casTail(t, s)) && in tryAppend()
[all …]
DFutureTask.java86 private V report(int s) throws ExecutionException { in report() argument
88 if (s == NORMAL) { in report()
92 if (s >= CANCELLED) in report()
157 int s = state; in get() local
158 if (s <= COMPLETING) in get()
159 s = awaitDone(false, 0L); in get()
160 return report(s); in get()
170 int s = state; in get() local
171 if (s <= COMPLETING && in get()
172 (s = awaitDone(true, unit.toNanos(timeout))) <= COMPLETING) in get()
[all …]
DSynchronousQueue.java227 boolean tryMatch(SNode s) { in tryMatch() argument
229 UNSAFE.compareAndSwapObject(this, matchOffset, null, s)) { in tryMatch()
237 return match == s; in tryMatch()
285 static SNode snode(SNode s, Object e, SNode next, int mode) { in snode() argument
286 if (s == null) s = new SNode(e); in snode()
287 s.mode = mode; in snode()
288 s.next = next; in snode()
289 return s; in snode()
317 SNode s = null; // constructed/reused as needed in transfer() local
328 } else if (casHead(h, s = snode(s, e, h, mode))) { in transfer()
[all …]
/libcore/luni/src/main/java/java/nio/charset/
DModifiedUtf8.java36 int count = 0, s = 0, a; in decode() local
38 if ((out[s] = (char) in[offset + count++]) < '\u0080') { in decode()
39 s++; in decode()
40 } else if (((a = out[s]) & 0xe0) == 0xc0) { in decode()
48 out[s++] = (char) (((a & 0x1F) << 6) | (b & 0x3F)); in decode()
58 out[s++] = (char) (((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F)); in decode()
63 return new String(out, 0, s); in decode()
73 public static long countBytes(String s, boolean shortLength) throws UTFDataFormatException { in countBytes() argument
75 final int length = s.length(); in countBytes()
77 char ch = s.charAt(i); in countBytes()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/xnet/provider/jsse/
DNativeCryptoTest.java264 int s = NativeCrypto.SSL_new(c); in test_SSL_new() local
266 assertTrue(s != NULL); in test_SSL_new()
267 assertTrue((NativeCrypto.SSL_get_options(s) & 0x01000000L) != 0); // SSL_OP_NO_SSLv2 in test_SSL_new()
268 assertTrue((NativeCrypto.SSL_get_options(s) & NativeCrypto.SSL_OP_NO_SSLv3) == 0); in test_SSL_new()
269 assertTrue((NativeCrypto.SSL_get_options(s) & NativeCrypto.SSL_OP_NO_TLSv1) == 0); in test_SSL_new()
270 assertTrue((NativeCrypto.SSL_get_options(s) & NativeCrypto.SSL_OP_NO_TLSv1_1) == 0); in test_SSL_new()
271 assertTrue((NativeCrypto.SSL_get_options(s) & NativeCrypto.SSL_OP_NO_TLSv1_2) == 0); in test_SSL_new()
274 assertTrue(s != s2); in test_SSL_new()
277 NativeCrypto.SSL_free(s); in test_SSL_new()
289 int s = NativeCrypto.SSL_new(c); in test_SSL_use_certificate() local
[all …]
/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestSSLSessions.java49 public final TestSSLSocketPair s; field in TestSSLSessions
54 TestSSLSocketPair s) { in TestSSLSessions() argument
58 this.s = s; in TestSSLSessions()
62 s.close(); in close()
70 TestSSLSocketPair s = TestSSLSocketPair.create(); in create() local
71 return new TestSSLSessions(invalid, s.server.getSession(), s.client.getSession(), s); in create()

12345678910>>...12