Home
last modified time | relevance | path

Searched refs:s1 (Results 1 – 25 of 49) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DSequenceInputStreamTest.java31 String s1 = "Hello"; field in SequenceInputStreamTest
58 InputStream is = new ByteArrayInputStream(s1.getBytes("UTF-8")); in test_Constructor_LInputStreamLInputStream_Null()
74 streams[0] = new ByteArrayInputStream(s1.getBytes("UTF-8")); in test_ConstructorLjava_util_Enumeration()
89 byte buf[] = new byte[s1.length() + s2.length()]; in test_ConstructorLjava_util_Enumeration()
90 si.read(buf, 0, s1.length()); in test_ConstructorLjava_util_Enumeration()
91 si.read(buf, s1.length(), s2.length()); in test_ConstructorLjava_util_Enumeration()
93 buf, "UTF-8").equals(s1 + s2)); in test_ConstructorLjava_util_Enumeration()
108 si.available() == s1.length()); in test_available()
130 assertTrue("Read incorrect char", (char) si.read() == s1.charAt(1)); in test_read()
148 byte buf[] = new byte[s1.length() + s2.length()]; in test_read$BII()
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DOldSequenceInputStreamTest.java30 final String s1 = "Hello"; field in OldSequenceInputStreamTest
34 assertEquals("Returned incorrect number of bytes!", s1.length(), si.available()); in test_available()
37 si.available() == s1.length()); in test_available()
60 s1.charAt(1), (char) si.read()); in test_read()
66 s1.charAt(2), (char) si.read()); in test_read()
134 simple1 = new Support_ASimpleInputStream(s1); in test_read$BII_Excpetion()
187 assertEquals(s1.length(), sequenceInputStream1.read(buf, 0, s1.length())); in test_readArraySkipsEmpty()
188 assertEquals(s1, new String(buf, 0, s1.length())); in test_readArraySkipsEmpty()
191 assertEquals(-1, sequenceInputStream1.read(buf, 0, s1.length())); in test_readArraySkipsEmpty()
196 for (int i=0;i < s1.length(); i++) { in test_readSkipsEmpty()
[all …]
DOldAndroidInputStreamReaderTest.java94 String s1 = new String(ba, enc[i]); in testStringy() local
103 assertEquals(s1, s2); in testStringy()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DProviderServiceTest.java160 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testGetAlgorithm() local
162 assertTrue(s1.getAlgorithm().equals("algorithm")); in testGetAlgorithm()
172 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testGetClassName() local
174 assertTrue(s1.getClassName().equals("className")); in testGetClassName()
184 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testGetProvider() local
186 assertTrue(s1.getProvider() == p); in testGetProvider()
196 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testGetType() local
198 assertTrue(s1.getType().equals("type")); in testGetType()
208 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testSupportsParameter() local
210 assertTrue(s1.supportsParameter(null)); in testSupportsParameter()
[all …]
DSignerTest.java60 Signer s1 = new SignerStub("testToString1"); in test_toString() local
61 assertEquals("[Signer]testToString1", s1.toString()); in test_toString()
68 s1.setKeyPair(kp); in test_toString()
69 s1.toString(); in test_toString()
DProviderTest.java247 Set s1 = p.keySet(); in testKeySet() local
249 assertNotSame(s, s1); in testKeySet()
250 assertFalse(s1.isEmpty()); in testKeySet()
251 assertEquals(8, s1.size()); in testKeySet()
253 assertTrue(s1.contains("MessageDigest.SHA-256")); in testKeySet()
254 assertTrue(s1.contains("MessageDigest.SHA-1")); in testKeySet()
255 assertTrue(s1.contains("Alg.Alias.MessageDigest.SHA1")); in testKeySet()
256 assertTrue(s1.contains("MessageDigest.abc")); in testKeySet()
257 assertTrue(s1.contains("Provider.id info")); in testKeySet()
258 assertTrue(s1.contains("Provider.id className")); in testKeySet()
[all …]
DSignatureTest.java67 MySignature1 s1 = new MySignature1(null); in testConstructor() local
68 assertNull(s1.getAlgorithm()); in testConstructor()
69 assertNull(s1.getProvider()); in testConstructor()
70 assertEquals(0, s1.getState()); in testConstructor()
/libcore/ojluni/src/test/java/net/Socket/
DShutdownInput.java51 Socket s1 = new Socket(iaddr, ss.getLocalPort()); in main()
54 test(s1, s2, "Testing NET"); in main()
59 SocketChannel s1 = SocketChannel.open( in main()
63 test(s1.socket(), s2.socket(), "Testing NIO"); in main()
71 public static void test(Socket s1, Socket s2, String mesg) throws Exception { in test() argument
72 OutputStream os = s1.getOutputStream(); in test()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DRangeTest.java249 Spliterator.OfLong s1 = s.trySplit(); in testLongLongRange() local
250 assertNotSizedAndSubSized(s1); in testLongLongRange()
253 Spliterator.OfLong s2 = s1.trySplit(); in testLongLongRange()
254 assertSizedAndSubSized(s1); in testLongLongRange()
258 assertTrue(s1.estimateSize() < Long.MAX_VALUE); in testLongLongRange()
261 assertEquals(s.estimateSize() + s1.estimateSize() + s2.estimateSize(), in testLongLongRange()
275 Spliterator.OfLong s1 = s.trySplit(); in testLongLongRange()
276 assertSizedAndSubSized(s1); in testLongLongRange()
280 assertTrue(s1.estimateSize() < Long.MAX_VALUE); in testLongLongRange()
282 assertEquals(s.estimateSize() + s1.estimateSize(), end - start); in testLongLongRange()
[all …]
DConcatTest.java145 …private void assertRefConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean ord… in assertRefConcat() argument
146 Stream<Integer> result = Stream.concat(s1, s2); in assertRefConcat()
151 …private void assertIntConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean ord… in assertIntConcat() argument
152 IntStream result = IntStream.concat(s1.mapToInt(Integer::intValue), in assertIntConcat()
159 …private void assertLongConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean or… in assertLongConcat() argument
160 LongStream result = LongStream.concat(s1.mapToLong(Integer::longValue), in assertLongConcat()
167 …private void assertDoubleConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean … in assertDoubleConcat() argument
168 DoubleStream result = DoubleStream.concat(s1.mapToDouble(Integer::doubleValue), in assertDoubleConcat()
/libcore/ojluni/src/main/java/sun/util/locale/
DLocaleUtils.java50 public static boolean caseIgnoreMatch(String s1, String s2) { in caseIgnoreMatch() argument
51 if (s1 == s2) { in caseIgnoreMatch()
55 int len = s1.length(); in caseIgnoreMatch()
61 char c1 = s1.charAt(i); in caseIgnoreMatch()
70 static int caseIgnoreCompare(String s1, String s2) { in caseIgnoreCompare() argument
71 if (s1 == s2) { in caseIgnoreCompare()
74 return toLowerString(s1).compareTo(toLowerString(s2)); in caseIgnoreCompare()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DTreeSetTest.java312 Set s1 = new TreeSet(); in test_equals() local
314 s1.add("key1"); in test_equals()
315 s1.add("key2"); in test_equals()
318 assertFalse("Sets should not be equal 1", s1.equals(s2)); in test_equals()
319 assertFalse("Sets should not be equal 2", s2.equals(s1)); in test_equals()
322 s1 = new TreeSet(); in test_equals()
324 s1.add("key"); in test_equals()
326 assertFalse("Sets should not be equal 3", s1.equals(s2)); in test_equals()
327 assertFalse("Sets should not be equal 4", s2.equals(s1)); in test_equals()
DLinkedHashMapTest.java247 Set<Map.Entry<String, String>> s1 = m1.entrySet(); in entrySetRemoveHelper() local
248 s1.remove(m2.entrySet().iterator().next()); in entrySetRemoveHelper()
249 assertEquals("jumbo", s1.iterator().next().getKey()); in entrySetRemoveHelper()
530 Set s1 = lhm.entrySet(); in test_ordered_entrySet() local
531 Iterator it1 = s1.iterator(); in test_ordered_entrySet()
532 assertTrue("Returned set of incorrect size 1", lhm.size() == s1.size()); in test_ordered_entrySet()
592 Set s1 = lhm.keySet(); in test_ordered_keySet() local
593 Iterator it1 = s1.iterator(); in test_ordered_keySet()
594 assertTrue("Returned set of incorrect size", lhm.size() == s1.size()); in test_ordered_keySet()
648 Collection s1 = lhm.values(); in test_ordered_values() local
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DASCIICaseInsensitiveComparator.java40 public int compare(String s1, String s2) { in compare() argument
41 int n1=s1.length(), n2=s2.length(); in compare()
44 char c1 = s1.charAt(i); in compare()
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/
DHandler.java128 String s1 = u1.getHost(); in hostsEqual() local
130 if ("localhost".equalsIgnoreCase(s1) && ( s2 == null || "".equals(s2))) in hostsEqual()
132 if ("localhost".equalsIgnoreCase(s2) && ( s1 == null || "".equals(s1))) in hostsEqual()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DServerSocketChannelTest.java254 ServerSocket s1 = this.serverChannel.socket(); in testSocket_Block_BeforeClose() local
255 assertFalse(s1.isClosed()); in testSocket_Block_BeforeClose()
256 assertSocketNotAccepted(s1); in testSocket_Block_BeforeClose()
259 assertSame(s1, s2); in testSocket_Block_BeforeClose()
262 s1.close(); in testSocket_Block_BeforeClose()
270 ServerSocket s1 = this.serverChannel.socket(); in testSocket_NonBlock_BeforeClose() local
271 assertFalse(s1.isClosed()); in testSocket_NonBlock_BeforeClose()
272 assertSocketNotAccepted(s1); in testSocket_NonBlock_BeforeClose()
275 assertSame(s1, s2); in testSocket_NonBlock_BeforeClose()
278 s1.close(); in testSocket_NonBlock_BeforeClose()
[all …]
DDatagramChannelTest.java269 DatagramSocket s1 = dc.socket(); in testSocket_BasicStatusBeforeConnect() local
271 assertFalse(s1.isBound()); in testSocket_BasicStatusBeforeConnect()
272 assertFalse(s1.isClosed()); in testSocket_BasicStatusBeforeConnect()
273 assertFalse(s1.isConnected()); in testSocket_BasicStatusBeforeConnect()
274 assertFalse(s1.getBroadcast()); in testSocket_BasicStatusBeforeConnect()
275 assertFalse(s1.getReuseAddress()); in testSocket_BasicStatusBeforeConnect()
276 assertNull(s1.getInetAddress()); in testSocket_BasicStatusBeforeConnect()
277 assertTrue(s1.getLocalAddress().isAnyLocalAddress()); in testSocket_BasicStatusBeforeConnect()
278 assertEquals(s1.getLocalPort(), 0); in testSocket_BasicStatusBeforeConnect()
279 assertNull(s1.getLocalSocketAddress()); in testSocket_BasicStatusBeforeConnect()
[all …]
DSocketChannelTest.java342 Socket s1 = this.channel1.socket(); in testSocket_BasicStatusBeforeConnect() local
343 assertSocketBeforeBind(s1); in testSocket_BasicStatusBeforeConnect()
344 assertSocketBeforeConnect(s1); in testSocket_BasicStatusBeforeConnect()
347 assertSame(s1, s2); in testSocket_BasicStatusBeforeConnect()
355 Socket s1 = this.channel1.socket(); in testSocket_Block_BasicStatusAfterConnect() local
357 assertSocketAfterConnect(s1, localAddr1); in testSocket_Block_BasicStatusAfterConnect()
360 assertSame(s1, s2); in testSocket_Block_BasicStatusAfterConnect()
367 Socket s1; in testSocket_NonBlock_BasicStatusAfterConnect() local
372 s1 = this.channel1.socket(); in testSocket_NonBlock_BasicStatusAfterConnect()
374 assertSocketAfterImplicitBind(s1); in testSocket_NonBlock_BasicStatusAfterConnect()
[all …]
/libcore/luni/src/test/java/tests/java/lang/String/
DTests.java43 String s1 = "ABCDEFG"; in test_CASE_INSENSITIVE_ORDER() local
46 assertTrue(String.CASE_INSENSITIVE_ORDER.compare(s1, s2) == 0); in test_CASE_INSENSITIVE_ORDER()
/libcore/ojluni/src/main/java/java/io/
DSequenceInputStream.java87 public SequenceInputStream(InputStream s1, InputStream s2) { in SequenceInputStream() argument
90 v.addElement(s1); in SequenceInputStream()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DServerSocketTest.java142 ServerSocket s1 = new ServerSocket(0); in test_ConstructorII() local
145 ServerSocket s2 = new ServerSocket(s1.getLocalPort()); in test_ConstructorII()
152 s1.close(); in test_ConstructorII()
155 s1 = new ServerSocket(0); in test_ConstructorII()
156 int allocatedPort = s1.getLocalPort(); in test_ConstructorII()
157 s1.close(); in test_ConstructorII()
158 s1 = new ServerSocket(allocatedPort); in test_ConstructorII()
159 s1.close(); in test_ConstructorII()
/libcore/luni/src/test/java/libcore/java/net/
DDatagramSocketTest.java136 try (DatagramSocket s1 = new DatagramSocket()) { in testForceConnectToThrowSocketException() argument
137 s1.connect(validAddress); in testForceConnectToThrowSocketException()
138 s1.disconnect(); in testForceConnectToThrowSocketException()
/libcore/ojluni/annotations/hiddenapi/sun/misc/
DASCIICaseInsensitiveComparator.java35 public int compare(java.lang.String s1, java.lang.String s2) { in compare() argument
/libcore/luni/src/test/java/tests/security/cert/
DCertificateFactory1Test.java304 String s1 = it1.next(); in testCertificateFactory09() local
307 if (s1.equals(it2.next())) { in testCertificateFactory09()
312 assertTrue("Encoding: ".concat(s1).concat( in testCertificateFactory09()
320 String s1 = it1.next(); in testCertificateFactory09() local
323 if (s1.equals(it2.next())) { in testCertificateFactory09()
328 assertTrue("Encoding: ".concat(s1).concat( in testCertificateFactory09()
/libcore/ojluni/src/main/java/sun/net/www/protocol/ftp/
DFtpURLConnection.java351 String s1 = path.substring(i + 6, path.length()); in decodePath() local
352 if ("i".equalsIgnoreCase(s1)) { in decodePath()
355 if ("a".equalsIgnoreCase(s1)) { in decodePath()
358 if ("d".equalsIgnoreCase(s1)) { in decodePath()

12